Class: Eatr::Pipeline

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

Instance Method Summary collapse

Constructor Details

#initialize(steps) ⇒ Pipeline

Returns a new instance of Pipeline.



3
4
5
# File 'lib/eatr/pipeline.rb', line 3

def initialize(steps)
  @steps = steps
end

Instance Method Details

#call(row) ⇒ Object



7
8
9
# File 'lib/eatr/pipeline.rb', line 7

def call(row)
  @steps.reduce(row) { |memo, step| step.call(memo) }
end