Class: Bricolage::GenericTask::AnyAction
- Inherits:
-
Action
- Object
- Action
- Bricolage::GenericTask::AnyAction
- Defined in:
- lib/bricolage/genericdatasource.rb
Instance Method Summary collapse
-
#initialize(label, block) ⇒ AnyAction
constructor
A new instance of AnyAction.
- #run ⇒ Object
- #source ⇒ Object
Constructor Details
#initialize(label, block) ⇒ AnyAction
Returns a new instance of AnyAction.
22 23 24 25 |
# File 'lib/bricolage/genericdatasource.rb', line 22 def initialize(label, block) @label = label @block = block end |
Instance Method Details
#run ⇒ Object
31 32 33 |
# File 'lib/bricolage/genericdatasource.rb', line 31 def run @block.call(ds) end |
#source ⇒ Object
27 28 29 |
# File 'lib/bricolage/genericdatasource.rb', line 27 def source @label || @block.to_s end |