ruby / 2.6.3 / bundler / fetcher / base.html /

class Bundler::Fetcher::Base

Parent:
Object

Attributes

display_uri [R]
downloader [R]
remote [R]

Public Class Methods

new (downloader, remote, display_uri) Show source
# 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

Public Instance Methods

api_fetcher? () Show source
# File lib/bundler/fetcher/base.rb, line 37
def api_fetcher?
  false
end
available? () Show source
# File lib/bundler/fetcher/base.rb, line 33
def available?
  true
end
fetch_uri () Show source
# 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
remote_uri () Show source
# File lib/bundler/fetcher/base.rb, line 17
def remote_uri
  @remote.uri
end

Private Instance Methods

log_specs (debug_msg) Show source
# File lib/bundler/fetcher/base.rb, line 43
def log_specs(debug_msg)
  if Bundler.ui.debug?
    Bundler.ui.debug debug_msg
  else
    Bundler.ui.info ".", false
  end
end

Ruby Core © 1993–2017 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.