Exception: Type::ValidationError Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Type::ValidationError is raised internally in Type::Definition#cast! when, after casting, an element fails to validate.

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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



37
38
39
# File 'lib/type/error.rb', line 37

def message
  "#{input.inspect} is not valid #{type_definition}."
end