class Thor::Group
def dispatch(task, given_args, given_opts, config) #:nodoc:
The method responsible for dispatching given the args.
def dispatch(task, given_args, given_opts, config) #:nodoc: if Thor::HELP_MAPPINGS.include?(given_args.first) help(config[:shell]) return end args, opts = Thor::Options.split(given_args) opts = given_opts || opts if task new(args, opts, config).invoke_task(all_tasks[task]) else new(args, opts, config).invoke_all end end