diff options
Diffstat (limited to 'lib/rubygems/source_list.rb')
-rw-r--r-- | lib/rubygems/source_list.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/rubygems/source_list.rb b/lib/rubygems/source_list.rb index e6da50c2e5..e01f11cc1e 100644 --- a/lib/rubygems/source_list.rb +++ b/lib/rubygems/source_list.rb @@ -1,5 +1,18 @@ require 'rubygems/source' +## +# The SourceList represents the sources rubygems has been configured to use. +# A source may be created from an array of sources: +# +# Gem::SourceList.from %w[https://rubygems.example https://internal.example] +# +# Or by adding them: +# +# sources = Gem::SourceList.new +# sources.add 'https://rubygems.example' +# +# The most common way to get a SourceList is Gem.sources. + class Gem::SourceList include Enumerable @@ -91,7 +104,7 @@ class Gem::SourceList @sources.empty? end - def ==(other) + def == other # :nodoc: to_a == other end |