Class: Bundler::Fetcher::Base
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
| Subclasses: | |
| Inherits: | Object | 
| Defined in: | lib/bundler/fetcher/base.rb | 
Class Method Summary
- .new(downloader, remote, display_uri) ⇒ Base constructor
Instance Attribute Summary
- #api_fetcher? ⇒ Boolean readonly
- #available? ⇒ Boolean readonly
- #display_uri readonly
- #downloader readonly
- #remote readonly
Instance Method Summary
Constructor Details
    .new(downloader, remote, display_uri)  ⇒ Base 
  
# File 'lib/bundler/fetcher/base.rb', line 10
def initialize(downloader, remote, display_uri) raise "Abstract class" if self.class == Base @downloader = downloader @remote = remote @display_uri = display_uri end
Instance Attribute Details
    #api_fetcher?  ⇒ Boolean  (readonly)
  
  [ GitHub ]
# File 'lib/bundler/fetcher/base.rb', line 37
def api_fetcher? false end
    #available?  ⇒ Boolean  (readonly)
  
  [ GitHub ]
# File 'lib/bundler/fetcher/base.rb', line 33
def available? true end
#display_uri (readonly)
[ GitHub ]# File 'lib/bundler/fetcher/base.rb', line 7
attr_reader :display_uri
#downloader (readonly)
[ GitHub ]# File 'lib/bundler/fetcher/base.rb', line 6
attr_reader :downloader
#remote (readonly)
[ GitHub ]# File 'lib/bundler/fetcher/base.rb', line 8
attr_reader :remote
Instance Method Details
#fetch_uri
[ GitHub ]# File 'lib/bundler/fetcher/base.rb', line 21
def fetch_uri @fetch_uri ||= begin if remote_uri.host == "rubygems.org" uri = remote_uri.dup uri.host = "index.rubygems.org" uri else remote_uri end end end
#log_specs(debug_msg) (private)
[ GitHub ]#remote_uri
[ GitHub ]# File 'lib/bundler/fetcher/base.rb', line 17
def remote_uri @remote.uri end