Exception: Dry::Types::SchemaError
- Inherits:
-
CoercionError
- Object
- StandardError
- CoercionError
- Dry::Types::SchemaError
- Defined in:
- lib/dry/types/errors.rb
Instance Attribute Summary collapse
- #key ⇒ String, Symbol readonly
- #value ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(key, value, result) ⇒ SchemaError
constructor
A new instance of SchemaError.
Constructor Details
#initialize(key, value, result) ⇒ SchemaError
Returns a new instance of SchemaError.
79 80 81 82 83 84 85 86 |
# File 'lib/dry/types/errors.rb', line 79 def initialize(key, value, result) @key = key @value = value super( "#{value.inspect} (#{value.class}) has invalid type "\ "for :#{key} violates constraints (#{result} failed)" ) end |
Instance Attribute Details
#key ⇒ String, Symbol (readonly)
71 72 73 |
# File 'lib/dry/types/errors.rb', line 71 def key @key end |
#value ⇒ Object (readonly)
74 75 76 |
# File 'lib/dry/types/errors.rb', line 74 def value @value end |