Class
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
Read
The wrapped Gem::Source
Class Methods
::
lib/rubygems/source/lock.rb
View on GitHub
# File tmp/rubies/ruby-3.1.3/lib/rubygems/source/lock.rb, line 17
def initialize(source)
@wrapped = source
end
Creates a new Lock
source that wraps source
and moves it earlier in the sort list.
Instance Methods
lib/rubygems/source/lock.rb
View on GitHub
# File tmp/rubies/ruby-3.1.3/lib/rubygems/source/lock.rb, line 43
def fetch_spec(name_tuple)
@wrapped.fetch_spec name_tuple
end
Delegates to the wrapped source’s fetch_spec
method.