Class: Tap::Support::Joins::Sequence
- Inherits:
-
Tap::Support::Join
- Object
- Tap::Support::Join
- Tap::Support::Joins::Sequence
- Defined in:
- lib/tap/support/joins/sequence.rb
Overview
A Sequence join simply pass results from one task to the next.
Constant Summary
Constants inherited from Tap::Support::Join
Tap::Support::Join::FLAGS, Tap::Support::Join::SHORT_FLAGS
Instance Attribute Summary
Attributes included from Configurable
Instance Method Summary collapse
Methods inherited from Tap::Support::Join
#initialize, #inspect, join, #name, #options
Methods included from Configurable
included, #initialize_copy, #reconfigure
Constructor Details
This class inherits a constructor from Tap::Support::Join
Instance Method Details
#join(source, targets) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/tap/support/joins/sequence.rb', line 7 def join(source, targets) current_task = source targets.each do |next_task| complete(current_task) do |_result| yield(_result) if block_given? enq(next_task, _result) end current_task = next_task end end |