Class: Cask::CaskLoader::FromTapLoader Private
- Inherits:
-
FromTapPathLoader
- Object
- FromContentLoader
- FromPathLoader
- FromTapPathLoader
- Cask::CaskLoader::FromTapLoader
- Defined in:
- Library/Homebrew/cask/cask_loader.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.
Loads a cask from a specific tap.
Instance Attribute Summary
Attributes inherited from FromTapPathLoader
Attributes inherited from FromPathLoader
Attributes inherited from FromContentLoader
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. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of FromTapLoader.
151 152 153 154 |
# File 'Library/Homebrew/cask/cask_loader.rb', line 151 def initialize(tapped_name) user, repo, token = tapped_name.split("/", 3) super Tap.fetch(user, repo).cask_dir/"#{token}.rb" end |
Class Method Details
.can_load?(ref) ⇒ Boolean
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.
147 148 149 |
# File 'Library/Homebrew/cask/cask_loader.rb', line 147 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. You should avoid using this method if possible, as it may be removed or be changed in the future.
156 157 158 159 160 |
# File 'Library/Homebrew/cask/cask_loader.rb', line 156 def load(config:) tap.install unless tap.installed? super end |