Class: Gem::Resolver::BestSet
- Inherits:
-
ComposedSet
- Object
- Set
- ComposedSet
- Gem::Resolver::BestSet
- Defined in:
- lib/rubygems/resolver/best_set.rb
Overview
The BestSet chooses the best available method to query a remote index.
It combines IndexSet and APISet
Instance Attribute Summary
Attributes inherited from ComposedSet
Instance Method Summary collapse
-
#initialize(sources = Gem.sources) ⇒ BestSet
constructor
Creates a BestSet for the given
sources
or Gem::sources if none are specified. -
#pretty_print(q) ⇒ Object
:nodoc:.
Methods inherited from ComposedSet
Methods inherited from Set
Constructor Details
#initialize(sources = Gem.sources) ⇒ BestSet
Creates a BestSet for the given sources
or Gem::sources if none are specified. sources
must be a Gem::SourceList.
12 13 14 15 16 17 18 |
# File 'lib/rubygems/resolver/best_set.rb', line 12 def initialize sources = Gem.sources super() sources.each_source do |source| @sets << source.dependency_resolver_set end end |
Instance Method Details
#pretty_print(q) ⇒ Object
:nodoc:
20 21 22 23 24 25 26 27 28 |
# File 'lib/rubygems/resolver/best_set.rb', line 20 def pretty_print q # :nodoc: q.group 2, '[BestSet', ']' do q.breakable q.text 'sets:' q.breakable q.pp @sets end end |