Class: Formulary::FormulaStubLoader Private

Inherits:
FromAPILoader 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 a formula stub from the internal API.

Instance Attribute Summary

Attributes inherited from FormulaLoader

#alias_path, #name, #path, #tap

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FromAPILoader

#initialize

Methods inherited from FormulaLoader

#get_formula, #initialize

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

This class inherits a constructor from Formulary::FromAPILoader

Class Method Details

.try_new(ref, from: 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.

Parameters:

  • ref (String, Pathname, URI::Generic)
  • from (Symbol, nil) (defaults to: nil)
  • warn (Boolean) (defaults to: false)

Returns:

  • (T.attached_class, nil)


1085
1086
1087
1088
1089
# File 'formulary.rb', line 1085

def self.try_new(ref, from: nil, warn: false)
  return unless Homebrew::EnvConfig.use_internal_api?

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

Parameters:

Returns:



1092
1093
1094
1095
# File 'formulary.rb', line 1092

def klass(flags:, ignore_errors:)
  load_from_api(flags:) unless Formulary.formula_class_defined_from_stub?(name)
  Formulary.formula_class_get_from_stub(name)
end