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, #required_ruby_version, #required_rubygems_version, #set, #source, #spec, #version

Instance Method Summary collapse

Methods inherited from SpecSpecification

#dependencies, #full_name, #initialize, #name, #platform, #required_ruby_version, #required_rubygems_version, #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)


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

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

  super
end

#local?Boolean

:nodoc:

Returns:

  • (Boolean)


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

def local? # :nodoc:
  true
end

#pretty_print(q) ⇒ Object

:nodoc:



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

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