Gem::CommandManager
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' Gem::CommandManager.instance.register_command :edit
You should put the implementation of your command in rubygems/commands.
# file rubygems/commands/edit_command.rb class Gem::Commands::EditCommand < Gem::Command # ... end
See Gem::Command for instructions on writing gem commands.
Included modules
- Gem::Text
- Gem::UserInteraction
Constants
BUILTIN_COMMANDS = [ # :nodoc:\n:build,\n:cert,\n:check,\n:cleanup,\n:contents,\n:dependency,\n:environment,\n:fetch,\n:generate_index,\n:help,\n:install,\n:list,\n:lock,\n:mirror,\n:open,\n:outdated,\n:owner,\n:pristine,\n:push,\n:query,\n:rdoc,\n:search,\n:server,\n:signin,\n:signout,\n:sources,\n:specification,\n:stale,\n:uninstall,\n:unpack,\n:update,\n:which,\n:yank,\n]
Files
- lib/rubygems/command_manager.rb