Spec-Zone.ru › Homebrew

Class: ArchRequirement Private

Inherits:
Requirement
  • Object
  • Requirement
  • ArchRequirement
show all
Defined in:
requirements/arch_requirement.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.

A requirement on a specific architecture.

Constant Summary collapse

Cache =

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.

type_template { { fixed: T::Hash[String, T.untyped] } }

Constants included from Dependable

Dependable::KEEP_BUT_PRUNE_RECURSIVE_DEPS, Dependable::PRUNE, Dependable::RESERVED_TAGS, Dependable::SKIP

Instance Attribute Summary collapse

  • #arch ⇒ Symbol? readonly private

Attributes inherited from Requirement

#cask, #download, #name, #tags

Instance Method Summary collapse

  • #display_s ⇒ String private
  • #initialize(tags) ⇒ void constructor private
  • #message ⇒ String private

Methods inherited from Requirement

cask, download, #env, env, #env_proc, expand, fatal, #fatal?, inherited, #mktemp, #modify_build_environment, #option_names, prune?, #satisfied?, #satisfied_result_parent, satisfy, #tap, #which

Methods included from BuildEnvironment::DSL

#env, #inherited

Methods included from Cachable

#cache, #clear_cache

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 Dependable

#build?, #implicit?, #no_linkage?, #option_names, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #tags, #test?

Constructor Details

#initialize(tags) ⇒ 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:

  • tags (Array<Symbol>)


21
22
23
24
# File 'requirements/arch_requirement.rb', line 21

def initialize(tags)
  @arch = T.let(tags.shift, T.nilable(Symbol))
  super
end

Instance Attribute Details

#arch ⇒ 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:

  • (Symbol, nil)


18
19
20
# File 'requirements/arch_requirement.rb', line 18

def arch
  @arch
end

Instance Method Details

#display_s ⇒ String

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:

  • (String)


45
46
47
# File 'requirements/arch_requirement.rb', line 45

def display_s
  "#{@arch} architecture"
end

#message ⇒ String

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:

  • (String)


35
36
37
# File 'requirements/arch_requirement.rb', line 35

def message
  "The #{@arch} architecture is required for this software."
end

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

Spec-Zone.ru

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