Class: Turbine::Pipeline::Pump
- Defined in:
- lib/turbine/pipeline/pump.rb
Overview
A pipeline segment which acts as the source for the pipeline. Values from the pump are “piped” through each segment in the pipeline.
Instance Attribute Summary
Attributes inherited from Segment
Instance Method Summary collapse
-
#initialize(source) ⇒ Pump
constructor
Public: Creates a new pump upon whose elements the pipeline will act.
Methods inherited from Segment
#append, #each, #inspect, #next, #rewind, #to_s, #trace, #tracing=
Constructor Details
#initialize(source) ⇒ Pump
Public: Creates a new pump upon whose elements the pipeline will act.
source - The elements in the source which will pass through the
pipeline. Anything which responds to #each is acceptable,
including arrays, Turbine collections, and enumerators.
Returns a Pump.
13 14 15 16 |
# File 'lib/turbine/pipeline/pump.rb', line 13 def initialize(source) @source = source.to_enum super() end |