class Gem::Resolver::InstalledSpecification

InstalledSpecification 表示一个已经本地安装的 gem。

公共实例方法

install(options = {}) { |nil| ... } 点击切换源代码

这是一个空安装,因为此规范已经安装。options 被忽略。

# File rubygems/resolver/installed_specification.rb, line 18
def install(options = {})
  yield nil
end
installable_platform?() 点击切换源代码

如果此 gem 可为当前平台安装,则返回 true

# File rubygems/resolver/installed_specification.rb, line 25
def installable_platform?
  # BACKCOMPAT If the file is coming out of a specified file, then we
  # ignore the platform. This code can be removed in RG 3.0.
  return true if @source.is_a? Gem::Source::SpecificFile

  super
end
source() 点击切换源代码

此规范的来源

# File rubygems/resolver/installed_specification.rb, line 54
def source
  @source ||= Gem::Source::Installed.new
end