Type:
Class

Base class for all Gem commands. When creating a new gem command, define initialize, execute, arguments, defaults_str, description and usage (as appropriate). See the above mentioned methods for details.

A very good example to look at is Gem::Commands::ContentsCommand

when_invoked
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::Command

when_invoked(&block) Instance Public methods Call the given block when invoked

2025-01-10 15:47:30
build_args=
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::Command

build_args=(value) Class Public methods

2025-01-10 15:47:30
get_all_gem_names_and_versions
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::Command

get_all_gem_names_and_versions() Instance Public methods Get all [gem, version]

2025-01-10 15:47:30
invoke
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::Command

invoke(*args) Instance Public methods Invoke the command with the given list

2025-01-10 15:47:30
get_one_optional_argument
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::Command

get_one_optional_argument() Instance Public methods Get a single optional argument

2025-01-10 15:47:30
specific_extra_args_hash
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::Command

specific_extra_args_hash() Class Public methods Accessor for the specific extra

2025-01-10 15:47:30
remove_option
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::Command

remove_option(name) Instance Public methods Remove previously defined command-line

2025-01-10 15:47:30
add_option
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::Command

add_option(*opts) Instance Public methods Add a command-line option and handler

2025-01-10 15:47:30
begins?
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::Command

begins?(long, short) Instance Public methods True if long begins

2025-01-10 15:47:30
add_specific_extra_args
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::Command

add_specific_extra_args(cmd,args) Class Public methods Add a list of extra arguments

2025-01-10 15:47:30