Exception: PowerConverter::ConversionError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- PowerConverter::ConversionError
- Defined in:
- lib/power_converter.rb
Overview
When you tried to convert something and it just won’t convert, this is a great exception to raise.
Instance Method Summary collapse
-
#initialize(value, options) ⇒ ConversionError
constructor
Do or do not.
Constructor Details
#initialize(value, options) ⇒ ConversionError
Do or do not. There is no try.
47 48 49 50 51 |
# File 'lib/power_converter.rb', line 47 def initialize(value, ) named_converter = [:to] scope = [:scope] super("Unable to convert #{value.inspect} to '#{named_converter}' (scope: #{scope.inspect}).") end |