Skip to content
On this page

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

class · Ruby 3.4

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