class CpuMemoryStats::OSDetection

Public Class Methods

detect() click to toggle source
# File lib/os_detection.rb, line 9
def self.detect
  case RbConfig::CONFIG['host_os']
  when /linux|cygwin/ then :Linux
  when /mac|darwin/ then :Mac
  when /bsd/ then :Bsd
  when /mswin|win|mingw/ then :Windows
  when /solaris|sunos/ then :Solaris
  else :unknown
  end
end