Exception: PriceHubble::EntityNotFound
- Inherits:
-
EntityError
- Object
- StandardError
- EntityError
- PriceHubble::EntityNotFound
- Defined in:
- lib/price_hubble/errors.rb
Overview
Raised when an entity was not found while searching/getting.
Instance Attribute Summary collapse
-
#criteria ⇒ Object
readonly
Returns the value of attribute criteria.
-
#entity ⇒ Object
readonly
Returns the value of attribute entity.
Instance Method Summary collapse
-
#initialize(message = nil, entity = nil, criteria = {}) ⇒ EntityNotFound
constructor
Create a new instance of the error.
Constructor Details
#initialize(message = nil, entity = nil, criteria = {}) ⇒ EntityNotFound
Create a new instance of the error.
36 37 38 39 40 41 42 |
# File 'lib/price_hubble/errors.rb', line 36 def initialize( = nil, entity = nil, criteria = {}) @entity = entity @criteria = criteria ||= "Couldn't find #{entity} with #{criteria.inspect}" super() end |
Instance Attribute Details
#criteria ⇒ Object (readonly)
Returns the value of attribute criteria.
29 30 31 |
# File 'lib/price_hubble/errors.rb', line 29 def criteria @criteria end |
#entity ⇒ Object (readonly)
Returns the value of attribute entity.
29 30 31 |
# File 'lib/price_hubble/errors.rb', line 29 def entity @entity end |