Exception: Toys::ArgParser::ToolUnrecognizedError

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

Overview

Defined in the toys-core gem

A UsageError indicating the given subtool name does not exist.

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, full_name: nil, suggestions: nil) ⇒ ToolUnrecognizedError

Create a ToolUnrecognizedError.

Parameters:

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

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

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

    The full path of the requested tool. Normally required.

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

    An array of suggestions to present to the user. Optional.



262
263
264
# File 'core-docs/toys/arg_parser.rb', line 262

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

Instance Attribute Details

#full_nameArray<String> (readonly)

Returns The full name of the tool.

Returns:

  • (Array<String>)

    The full name of the tool



269
270
271
# File 'core-docs/toys/arg_parser.rb', line 269

def full_name
  @full_name
end