class Gem::Resolver::LockSet - Documentation for Ruby 4.0
Description: class Gem::Resolver::LockSet: A set of gems from a gem dependencies lockfile.
Keywords: ruby,class,Gem::Resolver::LockSet

🔍

No recent searches

# class Gem::Resolver::LockSet

A set of gems from a gem dependencies lockfile.

### Public Class Methods

new (sources)
Source

    # File lib/rubygems/resolver/lock_set.rb, line 12
    def initialize(sources)
      super()

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

      @specs = []
    end

Creates a new `LockSet` from the given `sources`

Calls superclass method `BasicObject::new`

### Public Instance Methods

find_all (req)
Source

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

Returns an `Array` of IndexSpecification objects matching the DependencyRequest `req`.