Class: FormulaVersions::LegacyMacOSVersion Private

Inherits:
Version show all
Defined in:
formula_versions.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.

Resolve historical macOS conditionals using the target, never the worker host.

Constant Summary collapse

RELEASES =

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(MacOSVersion::RELEASES.merge(
  yosemite: "10.10", mavericks: "10.9", mountain_lion: "10.8", lion: "10.7",
  snow_leopard: "10.6", leopard: "10.5", tiger: "10.4"
).freeze, T::Hash[Symbol, String])
NULL =

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.

Linux answered historical macOS queries as older than every release from February 2018 until September 2024.

T.let(new("NULL").tap { |v| v.instance_variable_set(:@version, nil) }.freeze, LegacyMacOSVersion)

Constants inherited from Version

Version::NULL_TOKEN

Instance Method Summary collapse

Methods inherited from Version

#commit, #compare, detect, #detected_from_url?, formula_optionally_versioned_regex, #freeze, #head?, #initialize, #major, #major_minor, #major_minor_patch, #minor, #null?, parse, #patch, #respond_to?, #to_f, #to_i, #to_json, #to_str, #update_commit

Constructor Details

This class inherits a constructor from Version

Instance Method Details

#to_sym ⇒ Symbol

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:



127
128
129
# File 'formula_versions.rb', line 127

def to_sym
  RELEASES.key(to_s) || raise(FormulaSpecificationError, "Historical Linux MacOS.version has no release name")
end