Class: Gem::Source::Installed
- Inherits:
-
Gem::Source
- Object
- Gem::Source
- Gem::Source::Installed
- Defined in:
- lib/rubygems/source/installed.rb
Overview
Represents an installed gem. This is used for dependency resolution.
Direct Known Subclasses
Constant Summary
Constants inherited from Gem::Source
Instance Attribute Summary
Attributes inherited from Gem::Source
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
Installed sources sort before all other sources.
-
#download(spec, path) ⇒ Object
We don’t need to download an installed gem.
-
#initialize ⇒ Installed
constructor
:nodoc:.
-
#pretty_print(q) ⇒ Object
:nodoc:.
Methods inherited from Gem::Source
#==, #cache_dir, #dependency_resolver_set, #fetch_spec, #hash, #load_specs, #typo_squatting?, #update_cache?
Methods included from Text
#clean_text, #format_text, #levenshtein_distance, #min3, #truncate_text
Constructor Details
#initialize ⇒ Installed
:nodoc:
7 8 9 |
# File 'lib/rubygems/source/installed.rb', line 7 def initialize # :nodoc: @uri = nil end |
Instance Method Details
#<=>(other) ⇒ Object
Installed sources sort before all other sources
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rubygems/source/installed.rb', line 14 def <=>(other) case other when Gem::Source::Git, Gem::Source::Lock, Gem::Source::Vendor then -1 when Gem::Source::Installed then 0 when Gem::Source then 1 end end |
#download(spec, path) ⇒ Object
We don’t need to download an installed gem
30 31 32 |
# File 'lib/rubygems/source/installed.rb', line 30 def download(spec, path) nil end |
#pretty_print(q) ⇒ Object
:nodoc:
34 35 36 37 38 |
# File 'lib/rubygems/source/installed.rb', line 34 def pretty_print(q) # :nodoc: q.object_group(self) do q.text "[Installed]" end end |