Exception: Familia::IdentifierMismatchError
- Inherits:
-
HorreumError
- Object
- RuntimeError
- Problem
- HorreumError
- Familia::IdentifierMismatchError
- Defined in:
- lib/familia/errors.rb
Overview
Raised by Horreum#refresh! when the stored values it assigns would give the object an identifier other than the one that named the key it read. Examples are a stored identifier field that differs from the key, and a stored hash that lacks a field a Proc or method identifier reads. refresh! leaves the object as it was before raising, so it keeps the key it had.
+key+ is the key refresh! read. +resolved_key+ is the key the assigned values resolve to, or nil when they give no identifier.
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#resolved_key ⇒ Object
readonly
Returns the value of attribute resolved_key.
Instance Method Summary collapse
-
#initialize(key, resolved_key = nil) ⇒ IdentifierMismatchError
constructor
A new instance of IdentifierMismatchError.
Constructor Details
#initialize(key, resolved_key = nil) ⇒ IdentifierMismatchError
Returns a new instance of IdentifierMismatchError.
66 67 68 69 70 |
# File 'lib/familia/errors.rb', line 66 def initialize(key, resolved_key = nil) @key = key @resolved_key = resolved_key super() end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
64 65 66 |
# File 'lib/familia/errors.rb', line 64 def key @key end |
#resolved_key ⇒ Object (readonly)
Returns the value of attribute resolved_key.
64 65 66 |
# File 'lib/familia/errors.rb', line 64 def resolved_key @resolved_key end |