1
0
Fork 0
burden/lib/rake_control/config.rb

22 lines
463 B
Ruby
Raw Normal View History

2013-06-04 20:19:02 +00:00
module RakeControl
class Config
2013-06-06 14:15:38 +00:00
attr_accessor :storage, # Storage backend (ActiveRecord, Mongoid, MongoMapper)
:ignored_tasks # Do not log this tasks (eg. environment task)
2013-06-04 20:19:02 +00:00
def initialize
@storage = :active_record
2013-06-06 14:15:38 +00:00
@ignored_tasks = [:environment]
2013-06-04 20:19:02 +00:00
end
2013-06-06 14:15:38 +00:00
module Helper
def config
@config ||= Config.new
end
2013-06-04 20:41:48 +00:00
2013-06-06 14:15:38 +00:00
def configure
yield config if block_given?
2013-06-04 20:19:02 +00:00
end
end
end
end