Class: CpuMemoryStats::OSDetection
- Inherits:
-
Object
- Object
- CpuMemoryStats::OSDetection
- Defined in:
- lib/os_detection.rb
Class Method Summary collapse
Class Method Details
.detect ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/os_detection.rb', line 10 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 |