Class: Bundler::SystemGemSource
Instance Attribute Summary
Attributes inherited from Source
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
- #can_be_local? ⇒ Boolean
- #download(spec) ⇒ Object
- #gems ⇒ Object
-
#initialize(options) ⇒ SystemGemSource
constructor
A new instance of SystemGemSource.
- #to_s ⇒ Object
Constructor Details
#initialize(options) ⇒ SystemGemSource
Returns a new instance of SystemGemSource.
101 102 103 |
# File 'lib/bundler/source.rb', line 101 def initialize() @source = Gem::SourceIndex.from_installed_gems end |
Class Method Details
.instance ⇒ Object
97 98 99 |
# File 'lib/bundler/source.rb', line 97 def self.instance @instance ||= new({}) end |
Instance Method Details
#==(other) ⇒ Object
113 114 115 |
# File 'lib/bundler/source.rb', line 113 def ==(other) other.is_a?(SystemGemSource) end |
#can_be_local? ⇒ Boolean
105 106 107 |
# File 'lib/bundler/source.rb', line 105 def can_be_local? false end |
#download(spec) ⇒ Object
121 122 123 124 125 |
# File 'lib/bundler/source.rb', line 121 def download(spec) gemfile = Pathname.new(spec.loaded_from) gemfile = gemfile.dirname.join('..', 'cache', "#{spec.full_name}.gem") repository.cache(gemfile) end |
#gems ⇒ Object
109 110 111 |
# File 'lib/bundler/source.rb', line 109 def gems @gems ||= process_source_gems(@source.gems) end |
#to_s ⇒ Object
117 118 119 |
# File 'lib/bundler/source.rb', line 117 def to_s "system" end |