Module: OS::Mac::SimulateSystem Private

Defined in:
extend/os/mac/simulate_system.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

#current_osSymbol

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
# File 'extend/os/mac/simulate_system.rb', line 15

def current_os
  ::Homebrew::SimulateSystem.os || MacOS.version.to_sym
end

#simulating_or_running_on_macos?Boolean

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:

  • (Boolean)


8
9
10
11
12
# File 'extend/os/mac/simulate_system.rb', line 8

def simulating_or_running_on_macos?
  return true if Homebrew::SimulateSystem.os.blank?

  [:macos, *MacOSVersion::SYMBOLS.keys].include?(Homebrew::SimulateSystem.os)
end