End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem::Commands::SourcesCommand.new
new
lib/rubygems/commands/sources_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/commands/sources_command.rb, line 10
def initialize
require "fileutils"
super "sources",
"Manage the sources and cache file RubyGems uses to search for gems"
add_option "-a", "--add SOURCE_URI", "Add source" do |value, options|
options[:add] = value
end
add_option "-l", "--list", "List sources" do |value, options|
options[:list] = value
end
add_option "-r", "--remove SOURCE_URI", "Remove source" do |value, options|
options[:remove] = value
end
add_option "-c", "--clear-all",
"Remove all sources (clear the cache)" do |value, options|
options[:clear_all] = value
end
add_option "-u", "--update", "Update source cache" do |value, options|
options[:update] = value
end
add_option "-f", "--[no-]force", "Do not show any confirmation prompts and behave as if 'yes' was always answered" do |value, options|
options[:force] = value
end
add_proxy_option
end
No documentation available