Spec-Zone.ru › Homebrew

Class: Formulary::NullLoader Private

Inherits:
FormulaLoader
  • Object
  • FormulaLoader
  • Formulary::NullLoader
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.

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

  • .try_new(ref, from: nil, warn: false) ⇒ T.attached_class? private

Instance Method Summary collapse

  • #get_formula(_spec, alias_path: nil, force_bottle: false, flags: [], ignore_errors: false) ⇒ Formula private
  • #initialize(ref) ⇒ void constructor private

Methods inherited from FormulaLoader

#klass

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_upgradable, #pretty_warning

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.

Parameters:

  • ref (String, Pathname)


868
869
870
871
# File 'formulary.rb', line 868

def initialize(ref)
  name = File.basename(ref, ".rb")
  super name, Formulary.core_path(name)
end

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)


861
862
863
864
865
# File 'formulary.rb', line 861

def self.try_new(ref, from: nil, warn: false)
  return if ref.is_a?(URI::Generic)

  new(ref)
end

Instance Method Details

#get_formula(_spec, alias_path: nil, force_bottle: false, flags: [], ignore_errors: false) ⇒ 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:

  • _spec (Symbol)
  • alias_path (Pathname, String, nil) (defaults to: nil)
  • force_bottle (Boolean) (defaults to: false)
  • flags (Array<String>) (defaults to: [])
  • ignore_errors (Boolean) (defaults to: false)

Returns:

  • (Formula)

Raises:

  • (FormulaUnavailableError)


882
883
884
# File 'formulary.rb', line 882

def get_formula(_spec, alias_path: nil, force_bottle: false, flags: [], ignore_errors: false)
  raise FormulaUnavailableError, name
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/Formulary/NullLoader.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API