class Thor
def method_option(name, options={})
:hide - If you want to hide this option from the help.
:banner - String to show on usage notes.
:type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean.
:aliases - Aliases for this option.
:default - Default value for this argument. It cannot be required and have default values.
:required - If the argument is required or not.
:desc - Description for the argument.
==== Options
options
name
==== Parameters
end
# magic
def next_command
method_option :foo => :bar, :for => :previous_command
end
# magic
def previous_command
it allows you to change the options from a previous defined command.
Adds an option to the set of method options. If :for is given as option,
def method_option(name, options={}) scope = if options[:for] find_and_refresh_command(options[:for]).options else method_options end build_option(name, options, scope) end