lib/dry/struct/errors.rb in dry-struct-0.2.1 vs lib/dry/struct/errors.rb in dry-struct-0.3.0

- old
+ new

@@ -2,12 +2,16 @@ class Struct extend Dry::Configurable setting :namespace, self + # Raised when given input doesn't conform schema and constructor type Error = Class.new(TypeError) + # Raised when defining duplicate attributes class RepeatedAttributeError < ArgumentError + # @param [Symbol] key + # attribute name that is the same as previously defined one def initialize(key) super("Attribute :#{key} has already been defined") end end end