Exception: Dry::Struct::RepeatedAttributeError

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

Overview

Raised when defining duplicate attributes

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ RepeatedAttributeError

Returns a new instance of RepeatedAttributeError.

Parameters:

  • key (Symbol)

    attribute name that is the same as previously defined one



14
15
16
# File 'lib/dry/struct/errors.rb', line 14

def initialize(key)
  super("Attribute :#{key} has already been defined")
end