Class: Gem::Resolver::SourceSet
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
| Class Chain: 
          self,
           Set | |
| Instance Chain: 
          self,
           Set | |
| Inherits: | Gem::Resolver::Set 
 | 
| Defined in: | lib/rubygems/resolver/source_set.rb | 
Overview
The SourceSet chooses the best available method to query a remote index.
Kind off like BestSet but filters the sources for gems
Class Method Summary
- 
    
      .new  ⇒ SourceSet 
    
    constructor
    Creates a SourceSetfor the given Gem.sources or Gem.sources if none are specified.
Set - Inherited
Instance Attribute Summary
Set - Inherited
| #errors | Errors encountered when resolving gems. | 
| #prerelease | When true, allows matching of requests to prerelease gems. | 
| #remote | 
 | 
| #remote? | When true, this set is allowed to access the network when looking up specifications or dependencies. | 
Instance Method Summary
- #add_source_gem(name, source)
- #get_set(name) private
- #find_all(req) Internal use only
- 
    
      #prefetch(reqs)  
    
    Internal use only
    potentially no-op. 
Set - Inherited
Constructor Details
    .new  ⇒ SourceSet 
  
Creates a SourceSet for the given Gem.sources or Gem.sources if none are specified.  Gem.sources must be a ::Gem::SourceList.
# File 'lib/rubygems/resolver/source_set.rb', line 12
def initialize super() @links = {} @sets = {} end
Instance Method Details
#add_source_gem(name, source)
[ GitHub ]# File 'lib/rubygems/resolver/source_set.rb', line 36
def add_source_gem(name, source) @links[name] = source end
#find_all(req)
    This method is for internal use only.
  
  [ GitHub ]
# File 'lib/rubygems/resolver/source_set.rb', line 19
def find_all(req) # :nodoc: if set = get_set(req.dependency.name) set.find_all req else [] end end
#get_set(name) (private)
[ GitHub ]# 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
#prefetch(reqs)
    This method is for internal use only.
  
potentially no-op
# File 'lib/rubygems/resolver/source_set.rb', line 28
def prefetch(reqs) # :nodoc: reqs.each do |req| if set = get_set(req.dependency.name) set.prefetch reqs end end end