Class: Cask::CaskLoader::NullLoader Private
- Inherits:
-
FromPathLoader
- Object
- AbstractContentLoader
- FromPathLoader
- Cask::CaskLoader::NullLoader
- 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.
Pseudo-loader which raises an error when trying to load the corresponding cask.
Instance Attribute Summary
Attributes inherited from FromPathLoader
Attributes inherited from AbstractContentLoader
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(ref) ⇒ void constructor private
- #load(config:) ⇒ Object private
Methods inherited from FromPathLoader
Methods included from Utils::Output::Mixin
#odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled
Constructor Details
#initialize(ref) ⇒ 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.
581 582 583 584 |
# File 'cask/cask_loader.rb', line 581 def initialize(ref) token = File.basename(ref, ".rb") super CaskLoader.default_path(token) end |
Class Method Details
.try_new(ref, warn: false) ⇒ T.attached_class?
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.
573 574 575 576 577 578 |
# File 'cask/cask_loader.rb', line 573 def self.try_new(ref, warn: false) return if ref.is_a?(Cask) return if ref.is_a?(URI::Generic) new(ref) 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.
586 587 588 |
# File 'cask/cask_loader.rb', line 586 def load(config:) raise CaskUnavailableError.new(token, "No Cask with this name exists.") end |