Exception: Dry::Types::SchemaError

Inherits:
TypeError
  • Object
show all
Defined in:
lib/dry/types/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(key, value, result) ⇒ SchemaError

Returns a new instance of SchemaError.

Parameters:

  • key (String, Symbol)
  • value (Object)
  • result (String, #to_s)


13
14
15
# File 'lib/dry/types/errors.rb', line 13

def initialize(key, value, result)
  super("#{value.inspect} (#{value.class}) has invalid type for :#{key} violates constraints (#{result} failed)")
end