Class: Tasker::Types::StepSequence

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/tasker/types/step_sequence.rb

Overview

StepSequence represents a sequence of workflow steps to be executed.

It provides a container for an array of WorkflowStep instances and utility methods for working with the step sequence.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#stepsArray<Tasker::WorkflowStep> (readonly)

Returns List of workflow steps in this sequence.

Returns:



13
# File 'lib/tasker/types/step_sequence.rb', line 13

attribute :steps, Types::Array.default([].freeze)

Instance Method Details

#find_step_by_name(name) ⇒ Tasker::WorkflowStep?

Finds a step in the sequence by its name

Parameters:

  • name (String)

    The name of the step to find

Returns:



19
20
21
# File 'lib/tasker/types/step_sequence.rb', line 19

def find_step_by_name(name)
  Tasker::WorkflowStep.find_step_by_name(steps, name)
end