aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/dependency_resolver/installed_specification.rb
blob: af167572bf7718a9c313d191fbe41b6896368bd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class Gem::DependencyResolver::InstalledSpecification

  attr_reader :spec

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

  def == other # :nodoc:
    self.class === other and
      @set  == other.set and
      @spec == other.spec
  end

  def dependencies
    @spec.dependencies
  end

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

  def name
    @spec.name
  end

  def source
    @source ||= Gem::Source::Installed.new
  end

  def version
    @spec.version
  end

end