Class: Csvtool::Interface::CLI::Workflows::Steps::WorkflowStepPipeline

Inherits:
Object
  • Object
show all
Defined in:
lib/csvtool/interface/cli/workflows/steps/workflow_step_pipeline.rb

Instance Method Summary collapse

Constructor Details

#initialize(steps:) ⇒ WorkflowStepPipeline

Returns a new instance of WorkflowStepPipeline.



9
10
11
# File 'lib/csvtool/interface/cli/workflows/steps/workflow_step_pipeline.rb', line 9

def initialize(steps:)
  @steps = steps
end

Instance Method Details

#call(context) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/csvtool/interface/cli/workflows/steps/workflow_step_pipeline.rb', line 13

def call(context)
  @steps.each do |step|
    return false if step.call(context) == :halt
  end

  true
end