class Gem::Resolver::SpecSpecification
Resolver::SpecSpecification 包含由 Gem::Specification
支持的 Resolver 规范的常用功能。
公共类方法
new(set, spec, source = nil) 点击切换源代码
为 set
创建一个 SpecSpecification
,用于 spec
中的 Gem::Specification
。source
要么是 spec
的来源,要么应从中加载。
# File rubygems/resolver/spec_specification.rb, line 13 def initialize(set, spec, source = nil) @set = set @source = source @spec = spec end
公共实例方法
dependencies() 点击切换源代码
此规范的 gem 的依赖项
# File rubygems/resolver/spec_specification.rb, line 22 def dependencies spec.dependencies end
full_name() 点击切换源代码
规范的名称和版本。
与 Gem::Specification#full_name
不同,不包含平台。
# File rubygems/resolver/spec_specification.rb, line 45 def full_name "#{spec.name}-#{spec.version}" end
hash() 点击切换源代码
此规范的哈希值。
# File rubygems/resolver/spec_specification.rb, line 73 def hash spec.hash end
name() 点击切换源代码
此规范的 gem 的名称
# File rubygems/resolver/spec_specification.rb, line 52 def name spec.name end
platform() 点击切换源代码
此 gem 可以运行的平台。
# File rubygems/resolver/spec_specification.rb, line 59 def platform spec.platform end
required_ruby_version() 点击切换源代码
此规范的 required_ruby_version
约束
# File rubygems/resolver/spec_specification.rb, line 29 def required_ruby_version spec.required_ruby_version end
required_rubygems_version() 点击切换源代码
此规范的 required_rubygems_version
约束
# File rubygems/resolver/spec_specification.rb, line 36 def required_rubygems_version spec.required_rubygems_version end
version() 点击切换源代码
此规范的 gem 的版本。
# File rubygems/resolver/spec_specification.rb, line 66 def version spec.version end