In Files

  • rubygems/resolver/lock_specification.rb

Class/Module Index [+]



The LockSpecification comes from a lockfile (Gem::RequestSet::Lockfile).

A LockSpecification’s dependency information is pre-filled from the lockfile.

Public Class Methods

new(set, name, version, source, platform) click to toggle source
               # File rubygems/resolver/lock_specification.rb, line 9
def initialize set, name, version, source, platform

  @name     = name
  @platform = platform
  @set      = set
  @source   = source
  @version  = version

  @dependencies = []
  @spec         = nil

Public Instance Methods

install(options) click to toggle source

This is a null install as a locked specification is considered installed. options are ignored.

               # File rubygems/resolver/lock_specification.rb, line 26
def install options
  destination = options[:install_dir] || Gem.dir

  if File.exist? File.join(destination, 'specifications', spec.spec_name) then
    yield nil

spec() click to toggle source

A specification constructed from the lockfile is returned

               # File rubygems/resolver/lock_specification.rb, line 47
def spec
  @spec ||= do |s|     = @name
    s.version  = @version
    s.platform = @platform

    s.dependencies.concat @dependencies

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

blog comments powered by Disqus