Class: Gem::Resolver::InstalledSpecification
- Inherits:
-
SpecSpecification
- Object
- Specification
- SpecSpecification
- Gem::Resolver::InstalledSpecification
- Defined in:
- lib/rubygems/resolver/installed_specification.rb
Overview
An InstalledSpecification represents a gem that is already installed locally.
Instance Attribute Summary
Attributes inherited from Specification
#dependencies, #name, #platform, #required_ruby_version, #required_rubygems_version, #set, #spec, #version
Instance Method Summary collapse
-
#==(other) ⇒ Object
:nodoc:.
-
#install(options = {}) {|nil| ... } ⇒ Object
This is a null install as this specification is already installed.
-
#installable_platform? ⇒ Boolean
Returns
true
if this gem is installable for the current platform. -
#pretty_print(q) ⇒ Object
:nodoc:.
-
#source ⇒ Object
The source for this specification.
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, #local?
Constructor Details
This class inherits a constructor from Gem::Resolver::SpecSpecification
Instance Method Details
#==(other) ⇒ Object
:nodoc:
7 8 9 10 11 |
# File 'lib/rubygems/resolver/installed_specification.rb', line 7 def ==(other) # :nodoc: self.class === other and @set == other.set and @spec == other.spec end |
#install(options = {}) {|nil| ... } ⇒ Object
This is a null install as this specification is already installed. options
are ignored.
17 18 19 |
# File 'lib/rubygems/resolver/installed_specification.rb', line 17 def install( = {}) yield nil end |
#installable_platform? ⇒ Boolean
Returns true
if this gem is installable for the current platform.
24 25 26 27 28 29 30 |
# File 'lib/rubygems/resolver/installed_specification.rb', line 24 def installable_platform? # BACKCOMPAT If the file is coming out of a specified file, then we # ignore the platform. This code can be removed in RG 3.0. return true if @source.kind_of? Gem::Source::SpecificFile super end |
#pretty_print(q) ⇒ Object
:nodoc:
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/rubygems/resolver/installed_specification.rb', line 32 def pretty_print(q) # :nodoc: q.group 2, '[InstalledSpecification', ']' 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 spec.dependencies end end |