Class: Gem::Source::SpecificFile
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
::Gem::Source
|
|
|
Instance Chain:
self,
::Gem::Source,
::Gem::Text,
Comparable
|
|
| Inherits: |
Gem::Source
|
| Defined in: | lib/rubygems/source/specific_file.rb |
Overview
A source representing a single .gem file. This is used for installation of local gems.
Constant Summary
::Gem::Source - Inherited
Class Method Summary
-
.new(file) ⇒ SpecificFile
constructor
Creates a new
SpecificFilefor the gem infile
::Gem::Source - Inherited
| .new | Creates a new |
Instance Attribute Summary
-
#path
readonly
The path to the gem for this specific file.
-
#spec
readonly
The
::Gem::Specificationextracted from this.gem.
::Gem::Source - Inherited
| #update_cache? | Returns true when it is possible and safe to update the cache directory. |
| #uri | The URI this source will fetch gems from. |
Instance Method Summary
-
#<=>(other)
Orders this source against
other. - #download(spec, dir = nil) Internal use only
- #fetch_spec(name) Internal use only
- #load_specs(*a) Internal use only
- #pretty_print(q) Internal use only
::Gem::Source - Inherited
| #<=> | Sources are ordered by installation preference. |
| #cache_dir | Returns the local directory to write #uri to. |
| #dependency_resolver_set | Returns a Set that can fetch specifications from this source. |
| #download | |
| #fetch_spec | Fetches a specification for the given |
| #load_specs | Loads |
| #typo_squatting?, #enforce_trailing_slash, #new_dependency_resolver_set, #==, | |
| #eql? | Alias for #==. |
| #hash, #pretty_print | |
::Gem::Text - Included
| #clean_text | Remove any non-printable characters and make the text suitable for printing. |
| #format_text | Wraps |
| #levenshtein_distance | Returns a value representing the “cost” of transforming str1 into str2 Vendored version of |
| #truncate_text, #min3 | |
Constructor Details
.new(file) ⇒ SpecificFile
Creates a new SpecificFile for the gem in file
Instance Attribute Details
#path (readonly)
The path to the gem for this specific file.
# File 'lib/rubygems/source/specific_file.rb', line 11
attr_reader :path
#spec (readonly)
The ::Gem::Specification extracted from this .gem.
# File 'lib/rubygems/source/specific_file.rb', line 28
attr_reader :spec
Instance Method Details
#<=>(other)
Orders this source against other.
If other is a SpecificFile from a different gem name nil is returned.
If other is a SpecificFile from the same gem name the versions are compared using Version#<=>
Otherwise Gem::Source#<=> is used.
#download(spec, dir = nil)
#fetch_spec(name)
#load_specs(*a)
# File 'lib/rubygems/source/specific_file.rb', line 30
def load_specs(*a) # :nodoc: [@name] end
#pretty_print(q)
# File 'lib/rubygems/source/specific_file.rb', line 44
def pretty_print(q) # :nodoc: q.object_group(self) do q.group 2, "[SpecificFile:", "]" do q.breakable q.text @path end end end