class Gem::SourceList

The SourceList 表示 rubygems 配置使用的源。源可以从源数组创建

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

或者通过添加它们

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

获取 SourceList 最常见的方法是 Gem.sources