Class: Furnace::Transform::Pipeline

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

Instance Method Summary collapse

Constructor Details

#initialize(stages) ⇒ Pipeline

Returns a new instance of Pipeline.



4
5
6
# File 'lib/furnace/transform/pipeline.rb', line 4

def initialize(stages)
  @stages = stages
end

Instance Method Details

#run(*sequence) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/furnace/transform/pipeline.rb', line 8

def run(*sequence)
  @stages.each do |stage|
    sequence = stage.transform *sequence
  end

  sequence
end