Exception: ROM::ElementNotFoundError

Inherits:
KeyError
  • Object
show all
Defined in:
lib/rom/constants.rb

Overview

Exception raised when an element inside a component registry is not found

Instance Method Summary collapse

Constructor Details

#initialize(key, registry) ⇒ ElementNotFoundError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ElementNotFoundError.



44
45
46
# File 'lib/rom/constants.rb', line 44

def initialize(key, registry)
  super(set_message(key, registry))
end

Instance Method Details

#set_message(key, registry) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



49
50
51
# File 'lib/rom/constants.rb', line 49

def set_message(key, registry)
  "#{key.inspect} doesn't exist in #{registry.class.name} registry"
end