Parameters

name<Symbol>

The name of the argument.

options<Hash>

Described below.

Options

:desc - Description for the argument. :required - If the argument is
required or not. :default - Default value for this argument. It cannot be
required and have default values. :aliases - Aliases for this option.
:type - The type of the argument, can be :string, :hash, :array,
:numeric or :boolean. :banner - String to show on usage notes. :hide
- If you want to hide this option from the help.

.stop_on_unknown_option!(*command_names) ⇒ Object

Stop parsing of options as soon as an unknown option or a regular argument
is encountered. All remaining arguments are passed to the command. This is
useful if you have a command that can receive arbitrary additional options,
and where those additional options should not be handled by Thor.

Example

To better understand how this is useful, let's consider a command that
calls an external command. A user may want to pass arbitrary options and
arguments to that command. The command itself also accepts some options,
which should be handled by Thor.