In Files

  • ruby-3.1.2/lib/rubygems/resolver/lock_set.rb

Files

Class/Module Index [+]

Quicksearch

Gem::Resolver::LockSet

A set of gems from a gem dependencies lockfile.

Public Class Methods

new(sources) click to toggle source

Creates a new LockSet from the given sources

 
               # File ruby-3.1.2/lib/rubygems/resolver/lock_set.rb, line 11
def initialize(sources)
  super()

  @sources = sources.map do |source|
    Gem::Source::Lock.new source
  end

  @specs = []
end
            

Public Instance Methods

find_all(req) click to toggle source

Returns an Array of IndexSpecification objects matching the DependencyRequest req.

 
               # File ruby-3.1.2/lib/rubygems/resolver/lock_set.rb, line 43
def find_all(req)
  @specs.select do |spec|
    req.match? spec
  end
end