Class: Roast::Workflow::BaseIterationStep

Inherits:
BaseStep
  • Object
show all
Includes:
ExpressionUtils
Defined in:
lib/roast/workflow/base_iteration_step.rb

Overview

Base class for iteration steps (RepeatStep and EachStep)

Direct Known Subclasses

EachStep, RepeatStep

Constant Summary collapse

DEFAULT_MAX_ITERATIONS =
100

Instance Attribute Summary collapse

Attributes inherited from BaseStep

#available_tools, #coerce_to, #context_path, #json, #model, #name, #params, #print_response, #resource, #workflow

Instance Method Summary collapse

Methods included from ExpressionUtils

#bash_command?, #extract_command, #extract_expression, #ruby_expression?

Methods inherited from BaseStep

#call

Constructor Details

#initialize(workflow, steps:, config_hash: {}, **kwargs) ⇒ BaseIterationStep

Returns a new instance of BaseIterationStep.



13
14
15
16
17
18
# File 'lib/roast/workflow/base_iteration_step.rb', line 13

def initialize(workflow, steps:, config_hash: {}, **kwargs)
  super(workflow, **kwargs)
  @steps = steps
  @config_hash = config_hash
  # Don't initialize cmd_tool here - we'll do it lazily when needed
end

Instance Attribute Details

#config_hashObject (readonly)

Returns the value of attribute config_hash.



11
12
13
# File 'lib/roast/workflow/base_iteration_step.rb', line 11

def config_hash
  @config_hash
end

#stepsObject (readonly)

Returns the value of attribute steps.



11
12
13
# File 'lib/roast/workflow/base_iteration_step.rb', line 11

def steps
  @steps
end