class Gem::SourceList

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

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

或者通过添加它们

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

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