Class: MaximumMacOSRequirement

Inherits:
Requirement show all
Defined in:
Library/Homebrew/requirements/maximum_macos_requirement.rb

Constant Summary

Constants included from Dependable

Dependable::RESERVED_TAGS

Instance Attribute Summary

Attributes inherited from Requirement

#cask, #download, #name, #tags

Instance Method Summary collapse

Methods inherited from Requirement

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

Methods included from BuildEnvironment::DSL

#env

Methods included from Dependable

#build?, #option_tags, #optional?, #options, #recommended?, #required?, #run?

Constructor Details

#initialize(tags) ⇒ MaximumMacOSRequirement

Returns a new instance of MaximumMacOSRequirement



6
7
8
9
# File 'Library/Homebrew/requirements/maximum_macos_requirement.rb', line 6

def initialize(tags)
  @version = MacOS::Version.from_symbol(tags.first)
  super
end

Instance Method Details

#display_sObject



20
21
22
# File 'Library/Homebrew/requirements/maximum_macos_requirement.rb', line 20

def display_s
  "macOS <= #{@version}"
end

#messageObject



13
14
15
16
17
18
# File 'Library/Homebrew/requirements/maximum_macos_requirement.rb', line 13

def message
  <<~EOS
    This formula either does not compile or function as expected on macOS
    versions newer than #{@version.pretty_name} due to an upstream incompatibility.
  EOS
end