Class: Gem::Source::Lock (Ruby 2.3.4)

In Files

  • rubygems/source/lock.rb

Parent

Methods

Class/Module Index [+]

Quicksearch

Gem::Source::Lock

frozen_string_literal: true

A Lock source wraps an installed gem’s source and sorts before other sources during dependency resolution. This allows RubyGems to prefer gems from dependency lock files.

Attributes

wrapped[R]

The wrapped Gem::Source

Public Class Methods

new(source)

Creates a new Lock source that wraps source and moves it earlier in the sort list.

 
               # File rubygems/source/lock.rb, line 18
def initialize source
  @wrapped = source
end
            

Public Instance Methods

fetch_spec(name_tuple)

Delegates to the wrapped source’s #fetch_spec method.

 
               # File rubygems/source/lock.rb, line 40
def fetch_spec name_tuple
  @wrapped.fetch_spec name_tuple
end