Module: OS::Mac::SystemConfig::ClassMethods Private

Extended by:
T::Helpers
Defined in:
extend/os/mac/system_config.rb

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

Instance Method Summary collapse

Instance Method Details

#cltVersion?

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:



38
39
40
# File 'extend/os/mac/system_config.rb', line 38

def clt
  @clt ||= MacOS::CLT.version if MacOS::CLT.installed?
end

#core_tap_config(out = $stdout) ⇒ 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.

This method returns an undefined value.

Parameters:

  • out (File, StringIO, IO) (defaults to: $stdout)


43
44
45
46
# File 'extend/os/mac/system_config.rb', line 43

def core_tap_config(out = $stdout)
  dump_tap_config(CoreTap.instance, out)
  dump_tap_config(CoreCaskTap.instance, out)
end

#describe_clangString

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:



21
22
23
24
25
26
# File 'extend/os/mac/system_config.rb', line 21

def describe_clang
  return "N/A" if ::SystemConfig.clang.null?

  clang_build_info = ::SystemConfig.clang_build.null? ? "(parse error)" : ::SystemConfig.clang_build
  "#{::SystemConfig.clang} build #{clang_build_info}"
end

#dump_verbose_config(out = $stdout) ⇒ 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.

This method returns an undefined value.

Parameters:

  • out (File, StringIO, IO) (defaults to: $stdout)


49
50
51
52
53
54
55
# File 'extend/os/mac/system_config.rb', line 49

def dump_verbose_config(out = $stdout)
  super
  out.puts "macOS: #{MacOS.full_version}-#{kernel}"
  out.puts "CLT: #{clt || "N/A"}"
  out.puts "Xcode: #{xcode || "N/A"}"
  out.puts "Rosetta 2: #{::Hardware::CPU.in_rosetta2?}" if ::Hardware::CPU.physical_cpu_arm64?
end

#initializevoid

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.



15
16
17
18
# File 'extend/os/mac/system_config.rb', line 15

def initialize
  @xcode = T.let(nil, T.nilable(String))
  @clt = T.let(nil, T.nilable(Version))
end

#xcodeString?

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:



29
30
31
32
33
34
35
# File 'extend/os/mac/system_config.rb', line 29

def xcode
  @xcode ||= if MacOS::Xcode.installed?
    xcode = MacOS::Xcode.version.to_s
    xcode += " => #{MacOS::Xcode.prefix}" unless MacOS::Xcode.default_prefix?
    xcode
  end
end