Class: Formulary::FormulaContentsLoader Private
- Inherits:
 - 
      FormulaLoader
      
        
- Object
 - FormulaLoader
 - Formulary::FormulaContentsLoader
 
 
- 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.
Load formulae directly from their contents.
Instance Attribute Summary collapse
- 
  
    
      #contents  ⇒ String 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  private
  
    
The formula's contents.
 
Attributes inherited from FormulaLoader
#alias_path, #name, #path, #tap
Instance Method Summary collapse
- #initialize(name, path, contents) ⇒ void constructor private
 - #klass(flags:, ignore_errors:) ⇒ T.class_of(Formula) private
 
Methods inherited from FormulaLoader
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
Methods included from Context
current, current=, #debug?, #quiet?, #verbose?, #with_context
Constructor Details
#initialize(name, path, contents) ⇒ 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.
      1016 1017 1018 1019  | 
    
      # File 'formulary.rb', line 1016 def initialize(name, path, contents) @contents = contents super name, path end  | 
  
Instance Attribute Details
#contents ⇒ String (readonly)
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.
The formula's contents.
      1013 1014 1015  | 
    
      # File 'formulary.rb', line 1013 def contents @contents end  | 
  
Instance Method Details
#klass(flags:, ignore_errors:) ⇒ T.class_of(Formula)
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.
      1022 1023 1024 1025  | 
    
      # File 'formulary.rb', line 1022 def klass(flags:, ignore_errors:) namespace = "FormulaNamespace#{Digest::MD5.hexdigest(contents.to_s)}" Formulary.load_formula(name, path, contents, namespace, flags:, ignore_errors:) end  |