Exception: Rootage::NoSuchItem

Inherits:
Error
  • Object
show all
Defined in:
lib/rootage/exception.rb

Instance Method Summary collapse

Constructor Details

#initialize(scenario_name, sequence_name, item_name) ⇒ NoSuchItem

Returns a new instance of NoSuchItem.



23
24
25
26
27
# File 'lib/rootage/exception.rb', line 23

def initialize(scenario_name, sequence_name, item_name)
  @scenario_name = scenario_name
  @sequence_name = sequence_name
  @item_name = item_name
end

Instance Method Details

#argObject



29
30
31
# File 'lib/rootage/exception.rb', line 29

def arg
  {scenario: @scenario_name, sequence: @sequence_name, item: @item_name}
end

#messageObject



33
34
35
# File 'lib/rootage/exception.rb', line 33

def message
  'Item "%{item}" not found at sequence "%{sequence}" in scenario "%{scenario}".' % arg
end