Class: TTY::Option::MissingParameter
- Inherits:
-
ParseError
- Object
- ParseError
- TTY::Option::MissingParameter
- Defined in:
- lib/tty/option/errors.rb
Overview
Raised when a parameter is required but not present
Constant Summary collapse
- MESSAGE =
"%<type>s '%<name>s' must be provided"
Instance Attribute Summary
Attributes inherited from ParseError
Instance Method Summary collapse
-
#initialize(param_or_message) ⇒ MissingParameter
constructor
A new instance of MissingParameter.
Methods inherited from ParseError
Constructor Details
#initialize(param_or_message) ⇒ MissingParameter
Returns a new instance of MissingParameter.
127 128 129 130 131 132 133 134 135 136 |
# File 'lib/tty/option/errors.rb', line 127 def initialize() if .is_a?(Parameter) @param = = format(MESSAGE, name: param.name, type: param.to_sym) else = end super() end |