Class: URL
Instance Attribute Summary collapse
-
#specs ⇒ Object
readonly
private
Returns the value of attribute specs.
-
#using ⇒ Object
readonly
private
Returns the value of attribute using.
Instance Method Summary collapse
- #download_strategy ⇒ T.class_of(AbstractDownloadStrategy) private
- #initialize(url, specs = {}) ⇒ void constructor private
- #version ⇒ Version private
Constructor Details
#initialize(url, specs = {}) ⇒ 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.
10 11 12 13 14 15 |
# File 'url.rb', line 10 def initialize(url, specs = {}) @url = url.freeze @specs = specs.dup @using = @specs.delete(:using) @specs.freeze end |
Instance Attribute Details
#specs ⇒ Object (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.
Returns the value of attribute specs.
7 8 9 |
# File 'url.rb', line 7 def specs @specs end |
#using ⇒ Object (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.
Returns the value of attribute using.
7 8 9 |
# File 'url.rb', line 7 def using @using end |
Instance Method Details
#download_strategy ⇒ T.class_of(AbstractDownloadStrategy)
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.
23 24 25 |
# File 'url.rb', line 23 def download_strategy @download_strategy ||= DownloadStrategyDetector.detect(@url, @using) end |
#version ⇒ Version
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.
28 29 30 |
# File 'url.rb', line 28 def version @version ||= Version.detect(@url, **@specs) end |