In Files

  • rubygems/source/lock.rb



Class/Module Index [+]



frozen_string_literal: false

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.



The wrapped Gem::Source

Public Class Methods

new(source) click to toggle 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

Public Instance Methods

fetch_spec(name_tuple) click to toggle source

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

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit