Class: CFlow::Pipeline
- Inherits:
-
Object
- Object
- CFlow::Pipeline
- Defined in:
- lib/c_flow/pipeline.rb
Instance Method Summary collapse
- #call(input) ⇒ Object
-
#initialize(procs:) ⇒ Pipeline
constructor
A new instance of Pipeline.
Constructor Details
#initialize(procs:) ⇒ Pipeline
Returns a new instance of Pipeline.
3 4 5 |
# File 'lib/c_flow/pipeline.rb', line 3 def initialize(procs:) @procs = procs end |
Instance Method Details
#call(input) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/c_flow/pipeline.rb', line 7 def call(input) @procs.each do |proc| input = proc.call(input) end input end |