method

find_command

Importance_0
find_command(cmd_name) 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 172
  def find_command(cmd_name)
    possibilities = find_command_possibilities cmd_name

    if possibilities.size > 1 then
      raise Gem::CommandLineError,
            "Ambiguous command #{cmd_name} matches [#{possibilities.join(', ')}]"
    elsif possibilities.empty? then
      raise Gem::CommandLineError, "Unknown command #{cmd_name}"
    end

    self[possibilities.first]
  end
Register or log in to add new notes.