Skip to content
On this page
class · Ruby 4.0

Gem::SourceList

< Object include Enumerable 13 instance methods 2 class methods

The SourceList represents the sources rubygems has been configured to use. A source may be created from an array of sources:

Example
Gem::SourceList.from %w[https://rubygems.example https://internal.example]

Or by adding them:

Example
sources = Gem::SourceList.new
sources << 'https://rubygems.example'

The most common way to get a SourceList is Gem.sources.

Class methods 2

Instance methods 13

Attributes
Read

The sources in this list