Class: Cask::CaskLoader::FromTapLoader Private
- Inherits:
-
FromTapPathLoader
- Object
- AbstractContentLoader
- FromPathLoader
- FromTapPathLoader
- Cask::CaskLoader::FromTapLoader
- Defined in:
- cask/cask_loader.rb
Overview
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.
Loads a cask from a specific tap.
Instance Attribute Summary
Attributes inherited from FromPathLoader
Attributes inherited from AbstractContentLoader
Class Method Summary collapse
-
.can_load?(ref) ⇒ Boolean
private
Instance Method Summary collapse
-
#initialize(tapped_name) ⇒ FromTapLoader
constructor
private
A new instance of FromTapLoader.
-
#load(config:) ⇒ Object
private
Constructor Details
#initialize(tapped_name) ⇒ FromTapLoader
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 a new instance of FromTapLoader.
191 192 193 194 195 196 |
# File 'cask/cask_loader.rb', line 191 def initialize(tapped_name) user, repo, token = tapped_name.split("/", 3) tap = Tap.fetch(user, repo) cask = CaskLoader.find_cask_in_tap(token, tap) super cask end |
Class Method Details
.can_load?(ref) ⇒ Boolean
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.
187 188 189 |
# File 'cask/cask_loader.rb', line 187 def self.can_load?(ref) ref.to_s.match?(HOMEBREW_TAP_CASK_REGEX) end |
Instance Method Details
#load(config:) ⇒ Object
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.
198 199 200 201 202 |
# File 'cask/cask_loader.rb', line 198 def load(config:) raise TapCaskUnavailableError.new(tap, token) unless T.must(tap).installed? super end |