Class: Burden::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/burden/config.rb

Defined Under Namespace

Modules: Helper

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



10
11
12
13
14
# File 'lib/burden/config.rb', line 10

def initialize
  @storage = :active_record
  @log_file = 'tmp/rake.log'
  @ignored_tasks = [/environment/]
end

Instance Attribute Details

#ignored_tasksObject

Storage backend (ActiveRecord, Mongoid, MongoMapper)



3
4
5
# File 'lib/burden/config.rb', line 3

def ignored_tasks
  @ignored_tasks
end

#log_fileObject

Storage backend (ActiveRecord, Mongoid, MongoMapper)



3
4
5
# File 'lib/burden/config.rb', line 3

def log_file
  @log_file
end

#on_failureObject

Storage backend (ActiveRecord, Mongoid, MongoMapper)



3
4
5
# File 'lib/burden/config.rb', line 3

def on_failure
  @on_failure
end

#on_successObject

Storage backend (ActiveRecord, Mongoid, MongoMapper)



3
4
5
# File 'lib/burden/config.rb', line 3

def on_success
  @on_success
end

#storageObject

Storage backend (ActiveRecord, Mongoid, MongoMapper)



3
4
5
# File 'lib/burden/config.rb', line 3

def storage
  @storage
end

#storage_configObject

Storage backend (ActiveRecord, Mongoid, MongoMapper)



3
4
5
# File 'lib/burden/config.rb', line 3

def storage_config
  @storage_config
end

Instance Method Details

#trigger_failure_callback(name, execution_time, timestamp) ⇒ Object



20
21
22
# File 'lib/burden/config.rb', line 20

def trigger_failure_callback(name, execution_time, timestamp)
  on_failure.send(name, execution_time, timestamp) unless on_failure.nil?
end

#trigger_success_callback(name, execution_time, timestamp) ⇒ Object



16
17
18
# File 'lib/burden/config.rb', line 16

def trigger_success_callback(name, execution_time, timestamp)
  on_success.send(name, execution_time, timestamp) unless on_success.nil?
end