specific_extra_args

specific_extra_args(cmd) Class Public methods Return an array of extra arguments for the command. The extra arguments come from the gem configuration file read at program startup.

specific_extra_args_hash

specific_extra_args_hash() Class Public methods Accessor for the specific extra args hash (self initializing).

add_extra_args

add_extra_args(args) Instance Public methods Adds extra args from ~/.gemrc

add_option

add_option(*opts) Instance Public methods Add a command-line option and handler to the command. See OptionParser#make_switch for an explanation of opts. handler will be called with two values, the value of the argument and the options hash. If the first argument of #add_option is a Symbol, it's used to group options in output. See `gem help list` for an example.

arguments

arguments() Instance Public methods Override to provide details of the arguments a command takes. It should return a left-justified string, one argument per line. For example: def usage "#{program_name} FILE [FILE ...]" end def arguments "FILE name of file to find" end

begins?

begins?(long, short) Instance Public methods True if long begins with the characters from short.

defaults_str

defaults_str() Instance Public methods Override to display the default values of the command options. (similar to arguments, but displays the default values). For example: def defaults_str --no-gems-first --no-all end

description

description() Instance Public methods Override to display a longer description of what this command does.

execute

execute() Instance Public methods Override to provide command handling. options will be filled in with your parsed options, unparsed options will be left in options[:args]. See also: get_all_gem_names, get_one_gem_name, get_one_optional_argument

get_all_gem_names

get_all_gem_names() Instance Public methods Get all gem names from the command line.