Exception: Type::CastError

Inherits:
Error
  • Object
show all
Defined in:
lib/type/error.rb

Overview

Type::CastError is the raised class of Type::Definition#cast!

Instance Attribute Summary

Attributes inherited from Error

#cause, #input, #type_definition

Instance Method Summary collapse

Methods inherited from Error

#initialize, #to_s

Constructor Details

This class inherits a constructor from Type::Error

Instance Method Details

#messageObject



28
29
30
# File 'lib/type/error.rb', line 28

def message
  "Could not cast #{input.inspect} with #{type_definition}."
end