Exception: Dry::Struct::MissingAttributeError

Inherits:
KeyError
  • Object
show all
Defined in:
lib/dry/struct/errors.rb

Overview

Raised when a struct doesn't have an attribute

Instance Method Summary collapse

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