Exception: Rasti::Types::CastError
- Defined in:
- lib/rasti/types/errors.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(type, value) ⇒ CastError
constructor
A new instance of CastError.
Constructor Details
#initialize(type, value) ⇒ CastError
11 12 13 14 15 16 |
# File 'lib/rasti/types/errors.rb', line 11 def initialize(type, value) @type = type @value = value super "Invalid cast: #{display_value} -> #{type}" end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/rasti/types/errors.rb', line 9 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
9 10 11 |
# File 'lib/rasti/types/errors.rb', line 9 def value @value end |