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
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.
Return a sorted list of all command names as strings.
Compacts Marshal
output for the specs index data source by using identical objects as much as possible.
Turn an array of [name, version, platform] into an array of NameTuple
objects.
Copies this package to path
(if possible)
Combines sets
into a ComposedSet
that allows specification lookup in a uniform manner. If one of the sets
is itself a ComposedSet
its sets are flattened into the result ComposedSet
.
Returns a Gem::StubSpecification
for installed gem named name
Return the latest specs, optionally including prerelease specs if prerelease
is true.
Sanitize a single string.
Duplicates array_attributes
from other_spec
so state isn’t shared.
Return a string containing a Ruby code representation of the given object.
Returns the make command for the current platform. For versions of Ruby built on MS Windows with VC++ or Borland it will return ‘nmake’. On all other platforms, including Cygwin, it will return ‘make’.
Returns the make command for the current platform. For versions of Ruby built on MS Windows with VC++ or Borland it will return ‘nmake’. On all other platforms, including Cygwin, it will return ‘make’.
Terminate the application with exit code status
, running any exit handlers that might have been defined.