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



12
13
14
# File 'lib/dry/struct/errors.rb', line 12

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