Class: Turbine::Pipeline::Pump

Inherits:
Segment
  • Object
show all
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

#source

Instance Method Summary collapse

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