Skip to content
On this page

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class · Ruby 3.2

Gem::SourceList

< Object include Enumerable 11 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 11

Attributes
Read

The sources in this list