Sha256: 42634a14953a1018bb170f1ba2564dcfc062c1cb2a51db9761df6e8e2b8370e5

Contents?: true

Size: 940 Bytes

Versions: 30

Compression:

Stored size: 940 Bytes

Contents

# frozen_string_literal: true
require 'rubygems/command'
require 'rubygems/commands/query_command'

##
# An alternate to Gem::Commands::QueryCommand that searches for gems starting
# with the supplied argument.

class Gem::Commands::ListCommand < Gem::Commands::QueryCommand

  def initialize
    super 'list', 'Display local gems whose name matches REGEXP'

    remove_option('--name-matches')
  end

  def arguments # :nodoc:
    "REGEXP        regexp to look for in gem name"
  end

  def defaults_str # :nodoc:
    "--local --no-details"
  end

  def description # :nodoc:
    <<-EOF
The list command is used to view the gems you have installed locally.

The --details option displays additional details including the summary, the
homepage, the author, the locations of different versions of the gem.

To search for remote gems use the search command.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [REGEXP ...]"
  end

end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
rubygems-update-2.6.8 lib/rubygems/commands/list_command.rb
rubygems-update-2.6.7 lib/rubygems/commands/list_command.rb
rubygems-update-2.6.6 lib/rubygems/commands/list_command.rb
rubygems-update-2.6.5 lib/rubygems/commands/list_command.rb
rubygems-update-2.6.4 lib/rubygems/commands/list_command.rb
rubygems-update-2.6.3 lib/rubygems/commands/list_command.rb
rubygems-update-2.6.2 lib/rubygems/commands/list_command.rb
rubygems-update-2.6.1 lib/rubygems/commands/list_command.rb
rubygems-update-2.6.0 lib/rubygems/commands/list_command.rb
rubygems-update-2.5.2 lib/rubygems/commands/list_command.rb