Class: Gem::Resolver::LocalSpecification

Inherits:
SpecSpecification show all
Defined in:
lib/rubygems/resolver/local_specification.rb

Overview

A LocalSpecification comes from a .gem file on the local filesystem.

Instance Attribute Summary

Attributes inherited from Specification

#dependencies, #name, #platform, #set, #source, #spec, #version

Instance Method Summary collapse

Methods inherited from SpecSpecification

#dependencies, #full_name, #initialize, #name, #platform, #version

Methods inherited from Specification

#download, #fetch_development_dependencies, #full_name, #initialize, #install

Constructor Details

This class inherits a constructor from Gem::Resolver::SpecSpecification

Instance Method Details

#installable_platform?Boolean

Returns true if this gem is installable for the current platform.

Returns:

  • (Boolean)


10
11
12
13
14
# File 'lib/rubygems/resolver/local_specification.rb', line 10

def installable_platform?
  return true if @source.kind_of? Gem::Source::SpecificFile

  super
end

#local?Boolean

:nodoc:

Returns:

  • (Boolean)


16
17
18
# File 'lib/rubygems/resolver/local_specification.rb', line 16

def local? # :nodoc:
  true
end

#pretty_print(q) ⇒ Object

:nodoc:



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/rubygems/resolver/local_specification.rb', line 20

def pretty_print(q) # :nodoc:
  q.group 2, '[LocalSpecification', ']' do
    q.breakable
    q.text "name: #{name}"

    q.breakable
    q.text "version: #{version}"

    q.breakable
    q.text "platform: #{platform}"

    q.breakable
    q.text 'dependencies:'
    q.breakable
    q.pp dependencies

    q.breakable
    q.text "source: #{@source.path}"
  end
end