123456789_123456789_123456789_123456789_123456789_

Class: Gem::Resolver::SpecSpecification

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Gem::Resolver::Specification
Defined in: lib/rubygems/resolver/spec_specification.rb

Overview

The SpecSpecification contains common functionality for ::Gem::Resolver specifications that are backed by a ::Gem::Specification.

Class Method Summary

Specification - Inherited

.new

Sets default instance variables for the specification.

Instance Attribute Summary

Specification - Inherited

#dependencies

The dependencies of the gem for this specification.

#installable_platform?

Returns true if this specification is installable on this platform.

#name

The name of the gem for this specification.

#platform

The platform this gem works on.

#set

The set this specification came from.

#source

The source for this specification.

#spec
#version

The version of the gem for this specification.

Instance Method Summary

  • #dependencies

    The dependencies of the gem for this specification.

  • #full_name

    The name and version of the specification.

  • #name

    The name of the gem for this specification.

  • #platform

    The platform this gem works on.

  • #version

    The version of the gem for this specification.

Specification - Inherited

#full_name

The name and version of the specification.

#install

Installs this specification using the ::Gem::Installer options.

Constructor Details

.new(set, spec, source = nil) ⇒ SpecSpecification

A SpecSpecification is created for a set for a ::Gem::Specification in spec. The source is either where the spec came from, or should be loaded from.

[ GitHub ]

  
# File 'lib/rubygems/resolver/spec_specification.rb', line 13

def initialize set, spec, source = nil
  @set    = set
  @source = source
  @spec   = spec
end

Instance Method Details

#dependencies

The dependencies of the gem for this specification

[ GitHub ]

  
# File 'lib/rubygems/resolver/spec_specification.rb', line 22

def dependencies
  spec.dependencies
end

#full_name

The name and version of the specification.

Unlike Specification#full_name, the platform is not included.

[ GitHub ]

  
# File 'lib/rubygems/resolver/spec_specification.rb', line 31

def full_name
  "#{spec.name}-#{spec.version}"
end

#name

The name of the gem for this specification

[ GitHub ]

  
# File 'lib/rubygems/resolver/spec_specification.rb', line 38

def name
  spec.name
end

#platform

The platform this gem works on.

[ GitHub ]

  
# File 'lib/rubygems/resolver/spec_specification.rb', line 45

def platform
  spec.platform
end

#version

The version of the gem for this specification.

[ GitHub ]

  
# File 'lib/rubygems/resolver/spec_specification.rb', line 52

def version
  spec.version
end