method
new
v2_1_10 -
Show latest stable
- Class:
Gem::Resolver::IndexSet
new(source = nil)public
No documentation available.
# File lib/rubygems/resolver/index_set.rb, line 7
def initialize source = nil # :nodoc:
super()
@f =
if source then
sources = Gem::SourceList.from [source]
Gem::SpecFetcher.new sources
else
Gem::SpecFetcher.fetcher
end
@all = Hash.new { |h,k| h[k] = [] }
list, = @f.available_specs :released
list.each do |uri, specs|
specs.each do |n|
@all[n.name] << [uri, n]
end
end
@specs = {}
end