Class: Formulary::FormulaAPILoader Private

Inherits:
FormulaLoader show all
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 from the API.

Direct Known Subclasses

AliasAPILoader

Instance Attribute Summary

Attributes inherited from FormulaLoader

#alias_path, #name, #path

Instance Method Summary collapse

Methods inherited from FormulaLoader

#get_formula

Methods included from Context

current, current=, #debug?, #quiet?, #verbose?, #with_context

Constructor Details

#initialize(name) ⇒ FormulaAPILoader

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 FormulaAPILoader.



516
517
518
# File 'formulary.rb', line 516

def initialize(name)
  super name, Formulary.core_path(name)
end

Instance Method Details

#klass(flags:, ignore_errors:) ⇒ 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.



520
521
522
523
# File 'formulary.rb', line 520

def klass(flags:, ignore_errors:)
  load_from_api(flags: flags) unless Formulary.formula_class_defined_from_api?(name)
  Formulary.formula_class_get_from_api(name)
end