Class: Gem::CommandManager

Class | Gem::CommandManager
In: | lib/rubygems/command_manager.rb
Parent: | Object

The command manager registers and installs all the individual sub-commands supported by the gem command.

Extra commands can be provided by writing a rubygems_plugin.rb file in an installed gem. You should register your command against the Gem::CommandManager instance, like this:

      # file rubygems_plugin.rb
      require 'rubygems/command_manager'

      class Gem::Commands::EditCommand < Gem::Command
        # ...
      end

      Gem::CommandManager.instance.register_command :edit

See Gem::Command for instructions on writing gem commands.

### Methods

[] command_names find_command find_command_possibilities instance new process_args register_command run

### Included Modules

Gem::UserInteraction

### Public Class methods

instance()

Return the authoritative instance of the command manager.

new()

Register all the subcommands supported by the gem command.

### Public Instance methods

[](command_name)

Return the registered command from the command name.

command_names()

Return a sorted list of all command names (as strings).

find_command(cmd_name)
find_command_possibilities(cmd_name)
process_args(args)
register_command(command_obj)

Register the command object.

run(args)

Run the config specified by `args`.

[Validate]