Class: Toys::ArgParser::FlagValueUnacceptableError
- Inherits:
-
UsageError
- Object
- UsageError
- Toys::ArgParser::FlagValueUnacceptableError
- Defined in:
- lib/toys/arg_parser.rb
Overview
A UsageError indicating a flag 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) ⇒ FlagValueUnacceptableError
constructor
Create a FlagValueUnacceptableError.
Methods inherited from UsageError
Constructor Details
#initialize(message = nil, name: nil, value: nil, suggestions: nil) ⇒ FlagValueUnacceptableError
Create a FlagValueUnacceptableError.
172 173 174 175 |
# File 'lib/toys/arg_parser.rb', line 172 def initialize( = nil, name: nil, value: nil, suggestions: nil) super( || "Unacceptable value \"#{value}\" for flag \"#{name}\".", name: name, suggestions: suggestions) end |