module Thor::Base

def initialize(args=[], options={}, config={})


config:: Configuration for this Thor class.

access, magic predicates (options.skip?) and then frozen.
The hash given is converted to a hash with indifferent
options:: An options hash that will be available as self.options.

respective accessors declared with argument.
args:: An array of objects. The objects are applied to their
==== Parameters

It should be done by the parser.
Notice that it does not check if all required arguments were supplied.

other for configuration.
It receives arguments in an Array and two hashes, one for options and
def initialize(args=[], options={}, config={})
  Thor::Arguments.parse(self.class.arguments, args).each do |key, value|
    send("#{key}=", value)
  end
  parse_options = self.class.class_options
  if options.is_a?(Array)
    task_options  = config.delete(:task_options) # hook for start
    parse_options = parse_options.merge(task_options) if task_options
    array_options, hash_options = options, {}
  else
    array_options, hash_options = [], options
  end
  options = Thor::Options.parse(parse_options, array_options)
  self.options = Thor::CoreExt::HashWithIndifferentAccess.new(options).merge!(hash_options)
  self.options.freeze
end