aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/source/installed.rb
blob: 8e3a3560bf8e9f6160b2607be992c10fdb1f858c (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
class Gem::Source::Installed < Gem::Source

  def initialize
    @uri = nil
  end

  ##
  # Installed sources sort before all other sources

  def <=> other
    case other
    when Gem::Source::Installed then
      0
    when Gem::Source then
      1
    else
      nil
    end
  end

  ##
  # We don't need to download an installed gem

  def download spec, path
    nil
  end

end