Exception: LiquidResponse::UnsupportedValueError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- LiquidResponse::UnsupportedValueError
- Defined in:
- lib/liquid_response/errors.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, key = nil) ⇒ UnsupportedValueError
constructor
A new instance of UnsupportedValueError.
- #message ⇒ Object
Constructor Details
#initialize(value, key = nil) ⇒ UnsupportedValueError
Returns a new instance of UnsupportedValueError.
7 8 9 10 11 |
# File 'lib/liquid_response/errors.rb', line 7 def initialize(value, key = nil) @value = value @key = key super("Can't convert value #{value.inspect} of type #{value.class} to a liquid-compatible format") end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
5 6 7 |
# File 'lib/liquid_response/errors.rb', line 5 def key @key end |
#value ⇒ Object
Returns the value of attribute value.
5 6 7 |
# File 'lib/liquid_response/errors.rb', line 5 def value @value end |
Instance Method Details
#message ⇒ Object
13 14 15 |
# File 'lib/liquid_response/errors.rb', line 13 def key ? "Error converting value for key '#{key}': #{super}" : super end |