Module: TTY::Prompt::Converters
- Extended by:
- ConverterDSL
- Defined in:
- lib/tty/prompt/converters.rb
Class Method Summary collapse
-
.on_error ⇒ Object
private
Delegate Necromancer errors.
Methods included from ConverterDSL
convert, converter, converter_registry
Class Method Details
.on_error ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Delegate Necromancer errors
16 17 18 19 20 21 22 23 24 |
# File 'lib/tty/prompt/converters.rb', line 16 def self.on_error if block_given? yield else raise ArgumentError, 'You need to provide a block argument.' end rescue Necromancer::ConversionTypeError => e raise ConversionError, e. end |