class Dry::Types::ConstraintError
Attributes
input[R]
@return [Object]
result[R]
@return [String, to_s
]
Public Class Methods
new(result, input)
click to toggle source
@param [String, to_s
] result @param [Object] input
Calls superclass method
Dry::Types::CoercionError::new
# File lib/dry/types/errors.rb, line 124 def initialize(result, input) @result = result @input = input if result.is_a?(String) super(result) else super(to_s) end end
Public Instance Methods
message()
click to toggle source
@return [String]
# File lib/dry/types/errors.rb, line 136 def message "#{input.inspect} violates constraints (#{result} failed)" end
Also aliased as: to_s