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.
23 24 25 26 |
# File 'lib/bricolage/genericdatasource.rb', line 23 def initialize(label, block) @label = label @block = block end |
Instance Method Details
#run ⇒ Object
32 33 34 |
# File 'lib/bricolage/genericdatasource.rb', line 32 def run @block.call(ds) end |
#source ⇒ Object
28 29 30 |
# File 'lib/bricolage/genericdatasource.rb', line 28 def source @label || @block.to_s end |