Class: Mementus::Pipeline::Pipe

Inherits:
Object
  • Object
show all
Defined in:
lib/mementus/pipeline/pipe.rb

Overview

Base class for pipes to inherit from.

Direct Known Subclasses

Filter, Transform

Instance Method Summary collapse

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