Class: Toys::ArgParser::ArgValueUnacceptableError
- Inherits:
-
UsageError
- Object
- UsageError
- Toys::ArgParser::ArgValueUnacceptableError
- Defined in:
- lib/toys/arg_parser.rb
Overview
A UsageError indicating a positional argument did not accept the value given it.
Instance Attribute Summary
Attributes inherited from UsageError
#message, #name, #suggestions, #value
Instance Method Summary collapse
-
#initialize(message = nil, name: nil, value: nil, suggestions: nil) ⇒ ArgValueUnacceptableError
constructor
Create an ArgValueUnacceptableError.
Methods inherited from UsageError
Constructor Details
#initialize(message = nil, name: nil, value: nil, suggestions: nil) ⇒ ArgValueUnacceptableError
Create an ArgValueUnacceptableError.
193 194 195 196 |
# File 'lib/toys/arg_parser.rb', line 193 def initialize( = nil, name: nil, value: nil, suggestions: nil) super( || "Unacceptable value \"#{value}\" for positional argument \"#{name}\".", name: name, suggestions: suggestions) end |