Class: URL
Instance Attribute Summary collapse
- #specs ⇒ Hash{Symbol => T.untyped} readonly private
 - #using ⇒ Symbol, ... readonly private
 
Instance Method Summary collapse
- #download_strategy ⇒ T::Class[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.
      14 15 16 17 18 19  | 
    
      # File 'url.rb', line 14 def initialize(url, specs = {}) @url = T.let(url.freeze, String) @specs = T.let(specs.dup, T::Hash[Symbol, T.untyped]) @using = T.let(@specs.delete(:using), T.nilable(T.any(Symbol, T::Class[AbstractDownloadStrategy]))) @specs.freeze end  | 
  
Instance Attribute Details
#specs ⇒ Hash{Symbol => T.untyped} (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.
      8 9 10  | 
    
      # File 'url.rb', line 8 def specs @specs end  | 
  
#using ⇒ Symbol, ... (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.
      11 12 13  | 
    
      # File 'url.rb', line 11 def using @using end  | 
  
Instance Method Details
#download_strategy ⇒ T::Class[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.
      27 28 29 30  | 
    
      # File 'url.rb', line 27 def download_strategy @download_strategy ||= T.let(DownloadStrategyDetector.detect(@url, @using), T.nilable(T::Class[AbstractDownloadStrategy])) 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.
      33 34 35  | 
    
      # File 'url.rb', line 33 def version @version ||= T.let(Version.detect(@url, **@specs), T.nilable(Version)) end  |