Class: Gem::Resolver::VaultSet
- Inherits:
-
Set
- Object
- Set
- Gem::Resolver::VaultSet
- Defined in:
- lib/rubygems/resolver/vault_set.rb
Overview
A VaultSet looks up specifications from a .gemv vault source.
Returns standard Gem::Resolver::IndexSpecification objects so the resolver's install pipeline (download -> Gem::Installer) works unchanged.
Instance Method Summary collapse
- #find_all(req) ⇒ Object
-
#initialize(source) ⇒ VaultSet
constructor
A new instance of VaultSet.
- #prefetch(reqs) ⇒ Object
- #pretty_print(pp) ⇒ Object
Constructor Details
#initialize(source) ⇒ VaultSet
Returns a new instance of VaultSet.
7 8 9 10 11 |
# File 'lib/rubygems/resolver/vault_set.rb', line 7 def initialize(source) super() @source = source @specs = source.load_specs(:complete) end |
Instance Method Details
#find_all(req) ⇒ Object
13 14 15 |
# File 'lib/rubygems/resolver/vault_set.rb', line 13 def find_all(req) @specs.filter_map { |tuple| index_spec_for(req, tuple) } end |
#prefetch(reqs) ⇒ Object
17 |
# File 'lib/rubygems/resolver/vault_set.rb', line 17 def prefetch(reqs); end |
#pretty_print(pp) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rubygems/resolver/vault_set.rb', line 19 def pretty_print(pp) pp.group 2, "[VaultSet", "]" do next if @specs.empty? pp.breakable pp.seplist @specs do |tuple| pp.text tuple.full_name end end end |