Class: Mementus::Pipeline::Pipe
- Inherits:
-
Object
- Object
- Mementus::Pipeline::Pipe
- Defined in:
- lib/mementus/pipeline/pipe.rb
Overview
Base class for pipes to inherit from.
Instance Method Summary collapse
-
#call(element) ⇒ Object
Basic passthrough.
-
#initialize(graph) ⇒ Pipe
constructor
A new instance of Pipe.
-
#process(element) ⇒ Object
Basic passthrough.
Constructor Details
#initialize(graph) ⇒ Pipe
Returns a new instance of Pipe.
5 6 7 |
# File 'lib/mementus/pipeline/pipe.rb', line 5 def initialize(graph) @graph = graph end |
Instance Method Details
#call(element) ⇒ Object
Basic passthrough.
18 19 20 |
# File 'lib/mementus/pipeline/pipe.rb', line 18 def call(element) Fiber.yield(element) end |
#process(element) ⇒ Object
Basic passthrough.
13 14 15 |
# File 'lib/mementus/pipeline/pipe.rb', line 13 def process(element) element end |