Class Gem::Command
In: lib/rubygems/command.rb
Parent: Object

Base class for all Gem commands.

Methods

Included Modules

UserInteraction

Constants

Option = Struct.new(:short, :long, :description, :handler)

Attributes

command  [R] 
defaults  [RW] 
options  [R] 
program_name  [RW] 
summary  [RW] 

Public Class methods

Initialize a generic gem command.

Public Instance methods

Add a option (and a handler) to this command.

Override to provide details of the arguments a command takes. It should return a left-justified string, one argument per line.

Override to display the default values of the command options. (similar to arguments, but displays the default values).

Override to provide command handling.

True if the command handles the given argument list.

Invoke the command with the given list of arguments.

Merge a set of command options with the set of default options (without modifying the default option hash).

Remove a previously defined command option.

Display the help message for this command.

Override to display the usage for an individual gem command.

Call the given block when invoked.

Normal command invocations just executes the execute method of the command. Specifying an invocation block allows the test methods to override the normal action of a command to determine that it has been invoked correctly.

[Validate]