class Gem::Resolver::SourceSet

The SourceSet chooses the best available method to query a remote index.

Kind off like BestSet but filters the sources for gems

Public Class Methods

new() click to toggle source

Creates a SourceSet for the given sources or Gem.sources if none are specified. sources must be a Gem::SourceList.

Calls superclass method BasicObject.new
# File lib/rubygems/resolver/source_set.rb, line 12
def initialize
  super()

  @links = {}
  @sets  = {}
end

Public Instance Methods

add_source_gem(name, source) click to toggle source
# File lib/rubygems/resolver/source_set.rb, line 36
def add_source_gem name, source
  @links[name] = source
end

Private Instance Methods

get_set(name) click to toggle source
# File lib/rubygems/resolver/source_set.rb, line 42
def get_set(name)
  link = @links[name]
  @sets[link] ||= Gem::Source.new(link).dependency_resolver_set if link
end