Exception: Toys::ArgParser::ToolUnrecognizedError
- Inherits:
-
UsageError
- Object
- StandardError
- UsageError
- Toys::ArgParser::ToolUnrecognizedError
- Defined in:
- lib/toys/arg_parser.rb
Overview
A UsageError indicating the given subtool name does not exist.
Instance Attribute Summary collapse
-
#full_name ⇒ Array<String>
readonly
The full name of the tool.
Attributes inherited from UsageError
#message, #name, #suggestions, #value
Instance Method Summary collapse
-
#initialize(message = nil, full_name: nil, suggestions: nil) ⇒ ToolUnrecognizedError
constructor
Create a ToolUnrecognizedError.
Methods inherited from UsageError
Constructor Details
#initialize(message = nil, full_name: nil, suggestions: nil) ⇒ ToolUnrecognizedError
Create a ToolUnrecognizedError.
261 262 263 264 265 |
# File 'lib/toys/arg_parser.rb', line 261 def initialize( = nil, full_name: nil, suggestions: nil) @full_name = Array(full_name) super( || "Tool not found: \"#{@full_name.join(' ')}\"", value: @full_name.last, suggestions: suggestions, skip_frames: 1) end |
Instance Attribute Details
#full_name ⇒ Array<String> (readonly)
Returns The full name of the tool.
270 271 272 |
# File 'lib/toys/arg_parser.rb', line 270 def full_name @full_name end |