Class: ArchRequirement Private

Inherits:
Requirement show all
Extended by:
T::Sig
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

Constants included from Dependable

Dependable::RESERVED_TAGS

Instance Attribute Summary collapse

Attributes inherited from Requirement

#cask, #download, #name, #tags

Instance Method Summary collapse

Methods inherited from Requirement

#==, #env, env, #env_proc, expand, #fatal?, #hash, #mktemp, #modify_build_environment, #option_names, prune, prune?, #satisfied?, #satisfied_result_parent, satisfy

Methods included from BuildEnvironment::DSL

#env

Methods included from Cachable

#cache, #clear_cache

Methods included from Dependable

#build?, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #test?

Constructor Details

#initialize(tags) ⇒ ArchRequirement

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



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

def initialize(tags)
  @arch = tags.shift
  super(tags)
end

Instance Attribute Details

#archObject (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.



14
15
16
# File 'requirements/arch_requirement.rb', line 14

def arch
  @arch
end

Instance Method Details

#display_sString

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:



39
40
41
# File 'requirements/arch_requirement.rb', line 39

def display_s
  "#{@arch} architecture"
end

#inspectObject

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.



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

def inspect
  "#<#{self.class.name}: arch=#{@arch.to_s.inspect} #{tags.inspect}>"
end

#messageString

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:



30
31
32
# File 'requirements/arch_requirement.rb', line 30

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