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
50
51
52
# 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 = "\n" \
    "\e[31m#{@step_id.inspect} is not a valid step ID. Did you mean any of these ?\e[0m\n" \
    "\e[32m#{valid_ids.join("\n")}\e[0m"

  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