Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

Gem::SpecFetcher.new

new(sources = nil)

Creates a new SpecFetcher. Ordinarily you want to use the default fetcher from Gem::SpecFetcher::fetcher which uses the Gem.sources.

If you need to retrieve specifications from a different source, you can send it as an argument.