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.


47
48
49
# File 'lib/rom/constants.rb', line 47

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.


52
53
54
# File 'lib/rom/constants.rb', line 52

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