Exception: Toys::ArgParser::ExtraArgumentsError

Inherits:
UsageError
  • Object
show all
Defined in:
core-docs/toys/arg_parser.rb

Overview

Defined in the toys-core gem

A UsageError indicating extra arguments were supplied.

Instance Attribute Summary collapse

Attributes inherited from UsageError

#message, #name, #suggestions, #value

Instance Method Summary collapse

Methods inherited from UsageError

#message_with_suggestions

Constructor Details

#initialize(message = nil, arguments: nil) ⇒ ExtraArgumentsError

Create an ExtraArgumentsError.

Parameters:

  • message (String, nil) (defaults to: nil)

    A custom message. Normally omitted, in which case an appropriate default is supplied.

  • arguments (Array<String>) (defaults to: nil)

    All extra arguments. Normally required.



236
237
238
# File 'core-docs/toys/arg_parser.rb', line 236

def initialize(message = nil, arguments: nil)
  # Source available in the toys-core gem
end

Instance Attribute Details

#argumentsArray<String> (readonly)

Returns All extra arguments.

Returns:

  • (Array<String>)

    All extra arguments



243
244
245
# File 'core-docs/toys/arg_parser.rb', line 243

def arguments
  @arguments
end