method

find_command_possibilities

Importance_0
v2_1_10 - Show latest stable - 0 notes - Class: CommandManager
find_command_possibilities(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 184
  def find_command_possibilities(cmd_name)
    len = cmd_name.length

    found = command_names.select { |name| cmd_name == name[0, len] }

    exact = found.find { |name| name == cmd_name }

    exact ? [exact] : found
  end
Register or log in to add new notes.