Class: Gem::Source::Vendor

Inherits:
Installed show all
Defined in:
lib/rubygems/source/vendor.rb

Overview

This represents a vendored source that is similar to an installed gem.

Constant Summary

Constants inherited from Gem::Source

FILES

Instance Attribute Summary

Attributes inherited from Gem::Source

#uri

Instance Method Summary collapse

Methods inherited from Installed

#download, #pretty_print

Methods inherited from Gem::Source

#==, #cache_dir, #dependency_resolver_set, #download, #fetch_spec, #hash, #load_specs, #pretty_print, #typo_squatting?, #update_cache?

Methods included from Text

#clean_text, #format_text, #levenshtein_distance, #min3, #truncate_text

Constructor Details

#initialize(path) ⇒ Vendor

Creates a new Vendor source for a gem that was unpacked at path.



10
11
12
# File 'lib/rubygems/source/vendor.rb', line 10

def initialize(path)
  @uri = path
end

Instance Method Details

#<=>(other) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/rubygems/source/vendor.rb', line 14

def <=>(other)
  case other
  when Gem::Source::Lock then
    -1
  when Gem::Source::Vendor then
    0
  when Gem::Source then
    1
  else
    nil
  end
end