Exception: Virtus::CoercionError
- Inherits:
-
StandardError
- Object
- StandardError
- Virtus::CoercionError
- Defined in:
- lib/virtus.rb
Instance Attribute Summary collapse
- #output ⇒ Object readonly
- #primitive ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(output, primitive) ⇒ CoercionError
constructor
A new instance of CoercionError.
Constructor Details
#initialize(output, primitive) ⇒ CoercionError
Returns a new instance of CoercionError.
16 17 18 19 |
# File 'lib/virtus.rb', line 16 def initialize(output, primitive) @output, @primitive = output, primitive super("Failed to coerce #{output.inspect} into #{primitive.inspect}") end |
Instance Attribute Details
#output ⇒ Object (readonly)
14 15 16 |
# File 'lib/virtus.rb', line 14 def output @output end |
#primitive ⇒ Object (readonly)
14 15 16 |
# File 'lib/virtus.rb', line 14 def primitive @primitive end |