Class: Cask::CaskLoader::NullLoader Private
- Inherits:
-
FromPathLoader
- Object
- FromContentLoader
- FromPathLoader
- Cask::CaskLoader::NullLoader
- 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.
Pseudo-loader which raises an error when trying to load the corresponding cask.
Instance Attribute Summary
Attributes inherited from FromPathLoader
Attributes inherited from FromContentLoader
Class Method Summary collapse
-
.can_load? ⇒ Boolean
private
Instance Method Summary collapse
-
#initialize(ref) ⇒ NullLoader
constructor
private
A new instance of NullLoader.
-
#load(config:) ⇒ Object
private
Constructor Details
#initialize(ref) ⇒ NullLoader
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 NullLoader.
184 185 186 187 |
# File 'Library/Homebrew/cask/cask_loader.rb', line 184 def initialize(ref) token = File.basename(ref, ".rb") super CaskLoader.default_path(token) end |
Class Method Details
.can_load? ⇒ 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.
180 181 182 |
# File 'Library/Homebrew/cask/cask_loader.rb', line 180 def self.can_load?(*) true 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.
189 190 191 |
# File 'Library/Homebrew/cask/cask_loader.rb', line 189 def load(config:) raise CaskUnavailableError.new(token, "No Cask with this name exists.") end |