Exception: Toys::ArgParser::ExtraArgumentsError
- Inherits:
-
UsageError
- Object
- StandardError
- UsageError
- Toys::ArgParser::ExtraArgumentsError
- Defined in:
- lib/toys/arg_parser.rb
Overview
A UsageError indicating extra arguments were supplied.
Instance Attribute Summary collapse
-
#arguments ⇒ Array<String>
readonly
All extra arguments.
Attributes inherited from UsageError
#message, #name, #suggestions, #value
Instance Method Summary collapse
-
#initialize(message = nil, arguments: nil) ⇒ ExtraArgumentsError
constructor
Create an ExtraArgumentsError.
Methods inherited from UsageError
Constructor Details
#initialize(message = nil, arguments: nil) ⇒ ExtraArgumentsError
Create an ExtraArgumentsError.
235 236 237 238 239 |
# File 'lib/toys/arg_parser.rb', line 235 def initialize( = nil, arguments: nil) @arguments = Array(arguments) super( || "Extra arguments: \"#{@arguments.join(' ')}\".", value: @arguments.first, skip_frames: 1) end |
Instance Attribute Details
#arguments ⇒ Array<String> (readonly)
Returns All extra arguments.
244 245 246 |
# File 'lib/toys/arg_parser.rb', line 244 def arguments @arguments end |