Class: Homebrew::API::JSONDownload Private
- Includes:
- Downloadable
- Defined in:
- api/json_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
- #download_type ⇒ String private
- #downloader ⇒ API::JSONDownloadStrategy private
- #initialize(url, target:, stale_seconds:) ⇒ void constructor private
- #name ⇒ String 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, target:, stale_seconds:) ⇒ 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.
34 35 36 37 38 39 |
# File 'api/json_download.rb', line 34 def initialize(url, target:, stale_seconds:) super() @url = T.let(URL.new(url, using: API::JSONDownloadStrategy, target:, stale_seconds:), URL) @target = target @stale_seconds = stale_seconds end |
Instance Method Details
#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.
50 |
# File 'api/json_download.rb', line 50 def download_type = "JSON API" |
#downloader ⇒ API::JSONDownloadStrategy
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.
42 43 44 |
# File 'api/json_download.rb', line 42 def downloader T.cast(super, API::JSONDownloadStrategy) 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.
47 |
# File 'api/json_download.rb', line 47 def name = download_name |