class Thor
def method_option(name, options={})
: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_task
method_option :foo => :bar, :for => :previous_task
end
# magic
def previous_task
it allows you to change the options from a previous defined task.
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_task(options[:for]).options else method_options end build_option(name, options, scope) end