Class: Homebrew::API::Download Private

Inherits:
Downloadable show all
Defined in:
api/download.rb

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Instance Attribute Summary

Attributes inherited from Downloadable

#checksum, #mirrors, #url

Instance Method Summary collapse

Methods inherited from Downloadable

#cached_download, #clear_cache, #download_name, #download_strategy, #downloaded?, #downloader, #fetch, #freeze, #initialize_dup, #verify_download_integrity, #version

Methods included from Context

current, current=, #debug?, #quiet?, #verbose?, #with_context

Constructor Details

#initialize(url, checksum, mirrors: [], cache: nil) ⇒ void

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Parameters:



26
27
28
29
30
31
32
# File 'api/download.rb', line 26

def initialize(url, checksum, mirrors: [], cache: nil)
  super()
  @url = URL.new(url, using: API::DownloadStrategy)
  @checksum = checksum
  @mirrors = mirrors
  @cache = cache
end

Instance Method Details

#cachePathname

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns:



35
36
37
# File 'api/download.rb', line 35

def cache
  @cache || super
end

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns:



40
41
42
# File 'api/download.rb', line 40

def symlink_location
  T.cast(downloader, API::DownloadStrategy).symlink_location
end