Exception: Bhm::Errors::MissingKey

Inherits:
InvalidHash show all
Defined in:
lib/bhm/errors.rb

Overview

A required value was not found

Instance Method Summary collapse

Methods inherited from InvalidHash

#ref

Methods included from Chainable

#error_chain, included

Constructor Details

#initialize(message = nil, receiver:, key:) ⇒ MissingKey

Returns a new instance of MissingKey.



76
77
78
79
# File 'lib/bhm/errors.rb', line 76

def initialize(message = nil, receiver:, key:)
  message ||= "could not find key: #{key.inspect}"
  super(message, receiver: receiver, key: key)
end