Class: Cask::CaskLoader::FromInstanceLoader Private
- Includes:
- ILoader
- 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 an existing Cask::Cask instance.
Class Method Summary collapse
-
.can_load?(ref) ⇒ Boolean
private
Instance Method Summary collapse
-
#initialize(cask) ⇒ FromInstanceLoader
constructor
private
A new instance of FromInstanceLoader.
-
#load(config:) ⇒ Object
private
Constructor Details
#initialize(cask) ⇒ FromInstanceLoader
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 FromInstanceLoader.
223 224 225 |
# File 'cask/cask_loader.rb', line 223 def initialize(cask) @cask = 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.
219 220 221 |
# File 'cask/cask_loader.rb', line 219 def self.can_load?(ref) ref.is_a?(Cask) 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.
227 228 229 |
# File 'cask/cask_loader.rb', line 227 def load(config:) @cask end |