Exception: Bhm::Errors::InvalidHash
- Inherits:
-
KeyError
- Object
- KeyError
- Bhm::Errors::InvalidHash
- Includes:
- Chainable
- Defined in:
- lib/bhm/errors.rb
Overview
Generic error – the hash could not be fully validated
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(message = nil, receiver:, key:) ⇒ InvalidHash
constructor
A new instance of InvalidHash.
-
#ref ⇒ Object
From the invalid hash, get a period-joined string of keys leading to the invalid key or value.
Methods included from Chainable
Constructor Details
#initialize(message = nil, receiver:, key:) ⇒ InvalidHash
Returns a new instance of InvalidHash.
45 46 47 48 |
# File 'lib/bhm/errors.rb', line 45 def initialize( = nil, receiver:, key:) ||= "the hash could not be fully validated" super(, receiver: receiver, key: key) end |
Instance Method Details
#ref ⇒ Object
From the invalid hash, get a period-joined string of keys leading to the invalid key or value
51 52 53 |
# File 'lib/bhm/errors.rb', line 51 def ref error_chain.map(&:key).join(".") end |