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

#cltObject

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.



30
31
32
# File 'extend/os/mac/system_config.rb', line 30

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

#core_tap_config(out = $stdout) ⇒ Object

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
37
# File 'extend/os/mac/system_config.rb', line 34

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:



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

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) ⇒ Object

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.



39
40
41
42
43
44
45
# File 'extend/os/mac/system_config.rb', line 39

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

#xcodeObject

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.



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

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