dispatch(command, given_args, given_opts, config)
protected
The method responsible for dispatching given the args.
# File lib/bundler/vendor/thor/lib/thor/group.rb, line 217
def dispatch(command, given_args, given_opts, config) #:nodoc:
if Bundler::Thor::HELP_MAPPINGS.include?(given_args.first)
help(config[:shell])
return
end
args, opts = Bundler::Thor::Options.split(given_args)
opts = given_opts || opts
instance = new(args, opts, config)
yield instance if block_given?
if command
instance.invoke_command(all_commands[command])
else
instance.invoke_all
end
end