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 << 'https://rubygems.example'
The most common way to get a SourceList
is Gem.sources
.
- #
- C
- D
- E
- F
- I
- N
- R
- T
Attributes
[R] | sources | The sources in this list |
Class Public methods
from(ary) Link
Creates a new SourceList
from an array of sources.
new() Link
Creates a new SourceList
Instance Public methods
<<(obj) Link
Appends obj
to the source list which may be a Gem::Source
, Gem::URI
or URI
String
.
clear() Link
Removes all sources from the SourceList
.
delete(source) Link
Deletes source
from the source list which may be a Gem::Source
or a URI
.
each_source(&b) Link
Yields each source in the list.
empty?() Link
Returns true if there are no sources in this SourceList
.
first() Link
Returns the first source in the list.
include?(other) Link
Returns true if this source list includes other
which may be a Gem::Source
or a source URI
.
replace(other) Link
Replaces this SourceList
with the sources in other
See <<
for acceptable items in other
.