Class: Formulary::NullLoader Private
- Inherits:
-
FormulaLoader
- Object
- FormulaLoader
- Formulary::NullLoader
- Defined in:
- formulary.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 will raise a FormulaUnavailableError when trying to load the corresponding formula.
Instance Attribute Summary
Attributes inherited from FormulaLoader
#alias_path, #name, #path, #tap
Class Method Summary collapse
Instance Method Summary collapse
- #get_formula ⇒ Object private
- #initialize(ref) ⇒ void constructor private
Methods inherited from FormulaLoader
Methods included from Context
current, current=, #debug?, #quiet?, #verbose?, #with_context
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.
894 895 896 897 |
# File 'formulary.rb', line 894 def initialize(ref) name = File.basename(ref, ".rb") super name, Formulary.core_path(name) end |
Class Method Details
.try_new(ref, from: T.unsafe(nil), 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.
887 888 889 890 891 |
# File 'formulary.rb', line 887 def self.try_new(ref, from: T.unsafe(nil), warn: false) return if ref.is_a?(URI::Generic) new(ref) end |
Instance Method Details
#get_formula ⇒ 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.
899 900 901 |
# File 'formulary.rb', line 899 def get_formula(*) raise FormulaUnavailableError, name end |