class Rasti::Types::CastError
Attributes
type[R]
value[R]
Public Class Methods
new(type, value)
click to toggle source
Calls superclass method
# File lib/rasti/types/errors.rb, line 11 def initialize(type, value) @type = type @value = value super "Invalid cast: #{display_value} -> #{type}" end
Private Instance Methods
display_value()
click to toggle source
# File lib/rasti/types/errors.rb, line 20 def display_value value.is_a?(::String) ? "'#{value}'" : value.inspect end