# File lib/rubygems/command.rb, line 250
  def invoke(*args)
    handle_options(args)
    if options[:help]
      show_help
    elsif @when_invoked
      @when_invoked.call(options)
    else
      execute
    end
  end