module Bundler::Thor::Base::ClassMethods

def start(given_args = ARGV, config = {})


script.invoke(:command, first_arg, second_arg, third_arg)
script = MyScript.new(args, options, config)

can simply initialize it:
from an array. If you are inside Ruby and want to use a Bundler::Thor class, you
and invoke the command. This method is used when the arguments must be parsed
Parses the command and options from the given args, instantiate the class
def start(given_args = ARGV, config = {})
  config[:shell] ||= Bundler::Thor::Base.shell.new
  dispatch(nil, given_args.dup, nil, config)
rescue Bundler::Thor::Error => e
  config[:debug] || ENV["THOR_DEBUG"] == "1" ? (raise e) : config[:shell].error(e.message)
  exit(1) if exit_on_failure?
rescue Errno::EPIPE
  # This happens if a thor command is piped to something like `head`,
  # which closes the pipe when it's done reading. This will also
  # mean that if the pipe is closed, further unnecessary
  # computation will not occur.
  exit(0)
end