Class: Homebrew::API::SourceDownload Private
- Includes:
- Downloadable
- Defined in:
- api/source_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 collapse
- #formula ⇒ ::Formula readonly private
Attributes included from Downloadable
#checksum, #mirrors, #phase, #url
Instance Method Summary collapse
- #cache ⇒ Pathname private
- #clear_cache ⇒ void private
- #download_queue_type ⇒ String private
- #downloader ⇒ API::SourceDownloadStrategy private
- #initialize(url, checksum, formula:, mirrors: [], cache: nil) ⇒ void constructor private
- #symlink_location ⇒ Pathname private
Methods included from Downloadable
#cached_download, #download_queue_message, #download_queue_name, #download_strategy, #downloaded!, #downloaded?, #downloaded_and_valid?, #downloading!, #extracting!, #fetch, #fetched_size, #freeze, #initialize_dup, #stage_from_download_queue, #stage_from_download_queue?, #staged_path_from_download_queue, #total_size, verification_cache, #verified!, #verify_download_integrity, #verifying!, #version
Methods included from Utils::Output::Mixin
#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_cannot_install, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_unmarked, #pretty_upgradable, #pretty_warning
Methods included from Context
current, current=, #debug?, #deferred_environment_expansion?, #quiet?, #verbose?, #with_context
Constructor Details
#initialize(url, checksum, formula:, 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.
30 31 32 33 34 35 36 37 |
# File 'api/source_download.rb', line 30 def initialize(url, checksum, formula:, mirrors: [], cache: nil) super() @url = T.let(URL.new(url, using: API::SourceDownloadStrategy), URL) @checksum = checksum @formula = formula @mirrors = mirrors @cache = cache end |
Instance Attribute Details
#formula ⇒ ::Formula (readonly)
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.
19 20 21 |
# File 'api/source_download.rb', line 19 def formula @formula 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.
48 49 50 |
# File 'api/source_download.rb', line 48 def cache @cache || super end |
#clear_cache ⇒ 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.
This method returns an undefined value.
58 59 60 61 |
# File 'api/source_download.rb', line 58 def clear_cache super symlink_location.unlink if symlink_location.symlink? end |
#download_queue_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 |
# File 'api/source_download.rb', line 45 def download_queue_type = "API Source" |
#downloader ⇒ API::SourceDownloadStrategy
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/source_download.rb', line 40 def downloader T.cast(super, API::SourceDownloadStrategy) 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.
53 54 55 |
# File 'api/source_download.rb', line 53 def symlink_location downloader.symlink_location end |