module ProcessObserver::OS
Module with methods to identify current platform.
Public Class Methods
linux?()
click to toggle source
Whether Linux
(Unix but not Mac) is used.
# File lib/process_observer/os.rb, line 29 def OS.linux? OS.unix? and not OS.mac? end
mac?()
click to toggle source
Whether Mac is used.
# File lib/process_observer/os.rb, line 17 def OS.mac? (/darwin/ =~ RUBY_PLATFORM) != nil end
unix?()
click to toggle source
Whether Unix (not Windows
) is used.
# File lib/process_observer/os.rb, line 23 def OS.unix? !OS.windows? end
windows?()
click to toggle source
Whether Windows
is used.
# File lib/process_observer/os.rb, line 11 def OS.windows? (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil end