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.

#required_ruby_version

The required_ruby_version constraint for this specification.

#required_rubygems_version

The required_ruby_version constraint for this specification.

#set

The set this specification came from.

#source

The source for this specification.

#spec
#version

The version of the gem for this specification.

#local?

Instance Method Summary

Specification - Inherited

#download,
#full_name

The name and version of the specification.

#install

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

#fetch_development_dependencies

Fetches development dependencies if the source does not provide them by default (see APISpecification).

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 12

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 21

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 44

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 51

def name
  spec.name
end

#platform

The platform this gem works on.

[ GitHub ]

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

def platform
  spec.platform
end

#required_ruby_version

The required_ruby_version constraint for this specification

[ GitHub ]

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

def required_ruby_version
  spec.required_ruby_version
end

#required_rubygems_version

The required_rubygems_version constraint for this specification

[ GitHub ]

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

def required_rubygems_version
  spec.required_rubygems_version
end

#version

The version of the gem for this specification.

[ GitHub ]

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

def version
  spec.version
end