Class: Fall::StreamOperationPipeline
- Inherits:
-
Object
- Object
- Fall::StreamOperationPipeline
- Defined in:
- lib/fall/stream_operation_pipeline.rb
Instance Method Summary collapse
- #add_operation(operation) ⇒ Object (also: #add_stream_operation)
-
#initialize(source) ⇒ StreamOperationPipeline
constructor
A new instance of StreamOperationPipeline.
- #to_enum ⇒ Object
Constructor Details
#initialize(source) ⇒ StreamOperationPipeline
Returns a new instance of StreamOperationPipeline.
3 4 5 6 |
# File 'lib/fall/stream_operation_pipeline.rb', line 3 def initialize(source) @source = source @operation = StreamOperation.new(->(stream) { stream }) end |
Instance Method Details
#add_operation(operation) ⇒ Object Also known as: add_stream_operation
8 9 10 |
# File 'lib/fall/stream_operation_pipeline.rb', line 8 def add_operation(operation) @operation = @operation.chain(operation) end |
#to_enum ⇒ Object
14 15 16 |
# File 'lib/fall/stream_operation_pipeline.rb', line 14 def to_enum @operation.call(@source) end |