Class: Gem::Source::SpecificFile
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::Gem::Source
|
|
Instance Chain:
self,
::Gem::Source,
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.
Class Method Summary
-
.new(file) ⇒ SpecificFile
constructor
Creates a new
SpecificFile
for the gem infile
::Gem::Source - Inherited
.new | Creates a new ::Gem::Source which will use the index located at #uri. |
Instance Attribute Summary
-
#path
readonly
The path to the gem for this specific file.
-
#spec
readonly
The ::Gem::Specification extracted 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
.
::Gem::Source - Inherited
#<=> | Sources are ordered by installation preference. |
#cache_dir | Returns the local directory to write #uri to. |
#download | |
#fetch_spec | Fetches a specification for the given |
#load_specs | Loads |
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.