Flowdock
method

process_args

Importance_0
v2_1_10 - Show latest stable - 0 notes - Class: CommandManager
process_args(args, build_args=nil) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/command_manager.rb, line 148
  def process_args(args, build_args=nil)
    if args.empty? then
      say Gem::Command::HELP
      terminate_interaction 1
    end

    case args.first
    when '-h', '--help' then
      say Gem::Command::HELP
      terminate_interaction 0
    when '-v', '--version' then
      say Gem::VERSION
      terminate_interaction 0
    when /^-/ then
      alert_error "Invalid option: #{args.first}.  See 'gem --help'."
      terminate_interaction 1
    else
      cmd_name = args.shift.downcase
      cmd = find_command cmd_name
      cmd.invoke_with_build_args args, build_args
    end
  end
Register or log in to add new notes.