Class: TTY::Option::InvalidConversionArgument
- Inherits:
-
ParseError
- Object
- ParseError
- TTY::Option::InvalidConversionArgument
- Defined in:
- lib/tty/option/errors.rb
Overview
Raised when conversion provided with unexpected argument
Constant Summary collapse
- MESSAGE =
"cannot convert value of `%<value>s` into '%<cast>s' type " \ "for '%<name>s' %<type>s"
Instance Attribute Summary
Attributes inherited from ParseError
Instance Method Summary collapse
-
#initialize(param, value) ⇒ InvalidConversionArgument
constructor
A new instance of InvalidConversionArgument.
Methods inherited from ParseError
Constructor Details
#initialize(param, value) ⇒ InvalidConversionArgument
Returns a new instance of InvalidConversionArgument.
104 105 106 107 108 109 |
# File 'lib/tty/option/errors.rb', line 104 def initialize(param, value) @param = param = format(MESSAGE, value: value, cast: param.convert, name: param.name, type: param.to_sym) super() end |