Class: Homebrew::API::Download Private
- Includes:
- Downloadable
- 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 included from Downloadable
Instance Method Summary collapse
- #cache ⇒ Pathname private
- #download_type ⇒ String private
- #downloader ⇒ API::DownloadStrategy private
- #initialize(url, checksum, mirrors: [], cache: nil) ⇒ void constructor private
- #name ⇒ String private
- #symlink_location ⇒ Pathname private
Methods included from Downloadable
#cached_download, #clear_cache, #download_name, #download_strategy, #downloaded?, #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.
26 27 28 29 30 31 32 |
# File 'api/download.rb', line 26 def initialize(url, checksum, mirrors: [], cache: nil) super() @url = T.let(URL.new(url, using: API::DownloadStrategy), URL) @checksum = checksum @mirrors = mirrors @cache = cache end |
Instance Method Details
#cache ⇒ Pathname
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.
50 51 52 |
# File 'api/download.rb', line 50 def cache @cache || super end |
#download_type ⇒ String
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.
45 46 47 |
# File 'api/download.rb', line 45 def download_type "API source" end |
#downloader ⇒ API::DownloadStrategy
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.
35 36 37 |
# File 'api/download.rb', line 35 def downloader T.cast(super, API::DownloadStrategy) end |
#name ⇒ String
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.
40 41 42 |
# File 'api/download.rb', line 40 def name download_name end |
#symlink_location ⇒ Pathname
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.
55 56 57 |
# File 'api/download.rb', line 55 def symlink_location downloader.symlink_location end |