Class: Furnace::Transform::Pipeline
- Inherits:
-
Object
- Object
- Furnace::Transform::Pipeline
- Defined in:
- lib/furnace/transform/pipeline.rb
Instance Method Summary collapse
-
#initialize(stages) ⇒ Pipeline
constructor
A new instance of Pipeline.
- #run(*sequence) ⇒ Object
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 15 16 |
# File 'lib/furnace/transform/pipeline.rb', line 8 def run(*sequence) @stages.each do |stage| break if stage.nil? sequence = stage.transform *sequence end sequence end |