Class: Cask::Download Private
- Inherits:
-
Object
- Object
- Cask::Download
- Defined in:
- Library/Homebrew/cask/download.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A download corresponding to a Cask.
Instance Attribute Summary collapse
- #cask ⇒ Object readonly private
Instance Method Summary collapse
- #downloader ⇒ Object private
-
#initialize(cask, force: false, quarantine: nil) ⇒ Download
constructor
private
A new instance of Download.
- #perform ⇒ Object private
Constructor Details
#initialize(cask, force: false, quarantine: nil) ⇒ Download
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Download.
16 17 18 19 20 |
# File 'Library/Homebrew/cask/download.rb', line 16 def initialize(cask, force: false, quarantine: nil) @cask = cask @force = force @quarantine = quarantine end |
Instance Attribute Details
#cask ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 |
# File 'Library/Homebrew/cask/download.rb', line 14 def cask @cask end |
Instance Method Details
#downloader ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
29 30 31 32 33 34 |
# File 'Library/Homebrew/cask/download.rb', line 29 def downloader @downloader ||= begin strategy = DownloadStrategyDetector.detect(cask.url.to_s, cask.url.using) strategy.new(cask.url.to_s, cask.token, cask.version, cache: Cache.path, **cask.url.specs) end end |
#perform ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 25 26 27 |
# File 'Library/Homebrew/cask/download.rb', line 22 def perform clear_cache fetch quarantine downloaded_path end |