Class: OS::ThirdPartyHomebrew Private

Inherits:
T::Struct
  • Object
show all
Defined in:
os/third_party_homebrew.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.

Local evidence of a third-party Homebrew configuration and its support policy.

Constant Summary collapse

CONFIGURATIONS =

This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.

T.let(configurations.freeze, T::Hash[Symbol, ThirdPartyHomebrew])

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tier: 3, diagnostic: "A third-party tool manages this Homebrew installation or its package list.", issues_url: nil, check: nil) ⇒ void

Parameters:

  • tier (Integer, Symbol) (defaults to: 3)
  • diagnostic (String) (defaults to: "A third-party tool manages this Homebrew installation or its package list.")
  • issues_url (String, nil) (defaults to: nil)
  • check (Method, nil) (defaults to: nil)


# File ''

const :tier, T.any(Integer, Symbol), default: 3
const :diagnostic, String, default: "A third-party tool manages this Homebrew installation or its package list."
const :issues_url, T.nilable(String)
const :check, T.nilable(Method)

Instance Attribute Details

#check ⇒ Method? (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.

Returns the value of prop check.

Returns:



# File ''

const :check, T.nilable(Method)

#diagnostic ⇒ 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.

Returns the value of prop diagnostic.

Returns:



# File ''

const :diagnostic, String, default: "A third-party tool manages this Homebrew installation or its package list."

#issues_url ⇒ 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.

Returns the value of prop issues_url.

Returns:



# File ''

const :issues_url, T.nilable(String)

#tier ⇒ Integer, Symbol (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.

Returns the value of prop tier.

Returns:



# File ''

const :tier, T.any(Integer, Symbol), default: 3

Class Method Details

.detect ⇒ ThirdPartyHomebrew?

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.

Provisioners invoking regular brew inherit the installation's tier. https://github.com/ansible-collections/community.general/blob/main/plugins/modules/homebrew.py https://github.com/chef/chef/blob/main/lib/chef/provider/package/homebrew.rb https://github.com/saltstack/salt/blob/master/salt/modules/mac_brew_pkg.py

Returns:



45
46
47
# File 'os/third_party_homebrew.rb', line 45

def self.detect
  CONFIGURATIONS.each_value.find { |configuration| configuration.check&.call }
end