Exception: Dry::Struct::MissingAttributeError
- Inherits:
-
KeyError
- Object
- KeyError
- Dry::Struct::MissingAttributeError
- Defined in:
- lib/dry/struct/errors.rb
Overview
Raised when a struct doesn't have an attribute
Instance Method Summary collapse
-
#initialize(attribute:, klass:) ⇒ MissingAttributeError
constructor
A new instance of MissingAttributeError.
Constructor Details
#initialize(attribute:, klass:) ⇒ MissingAttributeError
Returns a new instance of MissingAttributeError.
19 20 21 |
# File 'lib/dry/struct/errors.rb', line 19 def initialize(attribute:, klass:) super("Missing attribute: #{attribute.inspect} on #{klass}") end |