Exception: Familia::KeyNotFoundError
- Inherits:
-
NonUniqueKey
- Object
- RuntimeError
- Problem
- PersistenceError
- NonUniqueKey
- Familia::KeyNotFoundError
- Defined in:
- lib/familia/errors.rb
Overview
Raised when attempting to refresh an object whose key doesn't exist in the database
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(key) ⇒ KeyNotFoundError
constructor
A new instance of KeyNotFoundError.
- #message ⇒ Object
Constructor Details
#initialize(key) ⇒ KeyNotFoundError
Returns a new instance of KeyNotFoundError.
90 91 92 93 |
# File 'lib/familia/errors.rb', line 90 def initialize(key) @key = key super end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
88 89 90 |
# File 'lib/familia/errors.rb', line 88 def key @key end |
Instance Method Details
#message ⇒ Object
95 96 97 |
# File 'lib/familia/errors.rb', line 95 def "Key not found: #{key}" end |