Exception: Altair::ConversionError
- Inherits:
-
StandardError
- Object
- StandardError
- Altair::ConversionError
- Defined in:
- lib/altair/conversion_error.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) ⇒ ConversionError
constructor
A new instance of ConversionError.
- #message ⇒ Object
Constructor Details
#initialize(type, value) ⇒ ConversionError
Returns a new instance of ConversionError.
5 6 7 8 |
# File 'lib/altair/conversion_error.rb', line 5 def initialize(type, value) @type = type @value = value end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/altair/conversion_error.rb', line 3 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/altair/conversion_error.rb', line 3 def value @value end |
Instance Method Details
#message ⇒ Object
10 11 12 |
# File 'lib/altair/conversion_error.rb', line 10 def "Cannot convert `#{value}` (of class #{value.class}) to #{type}" end |