Exception: OccamsRecord::NotFound
- Inherits:
-
StandardError
- Object
- StandardError
- OccamsRecord::NotFound
- Defined in:
- lib/occams-record/errors.rb
Overview
Exception when a requested record couldn’t be found.
Instance Attribute Summary collapse
- #attrs ⇒ Hash readonly
- #model_name ⇒ String readonly
Instance Method Summary collapse
-
#initialize(model_name, attrs) ⇒ NotFound
constructor
A new instance of NotFound.
- #message ⇒ String
Constructor Details
#initialize(model_name, attrs) ⇒ NotFound
Returns a new instance of NotFound.
44 45 46 |
# File 'lib/occams-record/errors.rb', line 44 def initialize(model_name, attrs) @model_name, @attrs = model_name, attrs end |
Instance Attribute Details
#attrs ⇒ Hash (readonly)
40 41 42 |
# File 'lib/occams-record/errors.rb', line 40 def attrs @attrs end |
#model_name ⇒ String (readonly)
38 39 40 |
# File 'lib/occams-record/errors.rb', line 38 def model_name @model_name end |
Instance Method Details
#message ⇒ String
49 50 51 |
# File 'lib/occams-record/errors.rb', line 49 def "#{model_name} could not be found with #{attrs}!" end |