Class: Capistrano::TaskCallback
- Defined in:
- lib/capistrano/callback.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Attributes inherited from Callback
#except, #only, #options, #source
Instance Method Summary collapse
- #applies_to?(task) ⇒ Boolean
- #call ⇒ Object
-
#initialize(config, source, options = {}) ⇒ TaskCallback
constructor
A new instance of TaskCallback.
Constructor Details
#initialize(config, source, options = {}) ⇒ TaskCallback
Returns a new instance of TaskCallback.
32 33 34 35 |
# File 'lib/capistrano/callback.rb', line 32 def initialize(config, source, ={}) super(source, ) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
30 31 32 |
# File 'lib/capistrano/callback.rb', line 30 def config @config end |
Instance Method Details
#applies_to?(task) ⇒ Boolean
41 42 43 |
# File 'lib/capistrano/callback.rb', line 41 def applies_to?(task) super && (task.nil? || task.fully_qualified_name != source.to_s) end |
#call ⇒ Object
37 38 39 |
# File 'lib/capistrano/callback.rb', line 37 def call config.find_and_execute_task(source) end |