Exception: Typed::Validations::TypeMismatchError
- Inherits:
-
ValidationError
- Object
- StandardError
- SerializationError
- DeserializeError
- ValidationError
- Typed::Validations::TypeMismatchError
- Extended by:
- T::Sig
- Defined in:
- lib/typed/validations/type_mismatch_error.rb
Instance Method Summary collapse
-
#initialize(field_name:, field_type:, given_type:) ⇒ TypeMismatchError
constructor
A new instance of TypeMismatchError.
Methods inherited from DeserializeError
Methods inherited from SerializationError
Constructor Details
#initialize(field_name:, field_type:, given_type:) ⇒ TypeMismatchError
Returns a new instance of TypeMismatchError.
9 10 11 |
# File 'lib/typed/validations/type_mismatch_error.rb', line 9 def initialize(field_name:, field_type:, given_type:) super("Invalid type given to #{field_name}. Expected #{field_type}, got #{given_type}.") end |