Skip to content
On this page

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class · Ruby 3.2

Gem::CommandManager

< Object include Gem::Text include Gem::UserInteraction 11 instance methods 3 class methods

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:

Example
# 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.

Example
# file rubygems/commands/edit_command.rb
class Gem::Commands::EditCommand < Gem::Command
  # ...
end

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

Class methods 3

Instance methods 11

Constants
No documentation available
No documentation available