method
find_command
ruby latest stable - Class:
Gem::CommandManager
find_command(cmd_name)public
No documentation available.
# File lib/rubygems/command_manager.rb, line 177
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