Class: PiecePipe::TapStep
Instance Attribute Summary
Attributes inherited from Step
Instance Method Summary collapse
-
#initialize(&block) ⇒ TapStep
constructor
A new instance of TapStep.
- #process(item) ⇒ Object
Methods inherited from Step
Constructor Details
#initialize(&block) ⇒ TapStep
Returns a new instance of TapStep.
3 4 5 |
# File 'lib/piece_pipe/tap_step.rb', line 3 def initialize(&block) @block = block end |
Instance Method Details
#process(item) ⇒ Object
7 8 9 10 |
# File 'lib/piece_pipe/tap_step.rb', line 7 def process(item) @block.call item produce item end |