Exception: Trailblazer::Activity::DSL::Linear::Sequence::IndexError

Inherits:
IndexError
  • Object
show all
Defined in:
lib/trailblazer/activity/dsl/linear.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sequence, step_id) ⇒ IndexError

Returns a new instance of IndexError.



43
44
45
46
47
48
49
# File 'lib/trailblazer/activity/dsl/linear.rb', line 43

def initialize(sequence, step_id)
  @step_id  = step_id
  valid_ids = sequence.collect{ |row| row[3][:id].inspect }

  message = %{#{@step_id.inspect} is not a valid step ID. Did you mean any of these ?\n#{valid_ids.join("\n")}}
  super(message)
end

Instance Attribute Details

#step_idObject (readonly)

Returns the value of attribute step_id.



41
42
43
# File 'lib/trailblazer/activity/dsl/linear.rb', line 41

def step_id
  @step_id
end