Class: Toys::ArgParser::FlagValueNotAllowedError
- Inherits:
-
UsageError
- Object
- UsageError
- Toys::ArgParser::FlagValueNotAllowedError
- Defined in:
- lib/toys/arg_parser.rb
Overview
A UsageError indicating a value was provided for a flag that does not take a value.
Instance Attribute Summary
Attributes inherited from UsageError
#message, #name, #suggestions, #value
Instance Method Summary collapse
-
#initialize(message = nil, name: nil) ⇒ FlagValueNotAllowedError
constructor
Create a FlagValueNotAllowedError.
Methods inherited from UsageError
Constructor Details
#initialize(message = nil, name: nil) ⇒ FlagValueNotAllowedError
Create a FlagValueNotAllowedError.
97 98 99 |
# File 'lib/toys/arg_parser.rb', line 97 def initialize( = nil, name: nil) super( || "Flag \"#{name}\" should not take an argument.", name: name) end |