Module: OS
- Defined in:
- lib/kvetch/os.rb
Overview
Finds out the current Operating System.
Class Method Summary collapse
Class Method Details
.linux? ⇒ Boolean
28 29 30 31 32 |
# File 'lib/kvetch/os.rb', line 28 def self.linux? linux = /linux/i (RbConfig::CONFIG['host_os'] =~ linux) != nil end |
.mac? ⇒ Boolean
16 17 18 19 20 |
# File 'lib/kvetch/os.rb', line 16 def self.mac? mac = /darwin|mac os/i (RbConfig::CONFIG['host_os'] =~ mac) != nil end |
.unix? ⇒ Boolean
22 23 24 25 26 |
# File 'lib/kvetch/os.rb', line 22 def self.unix? unix = /solaris|bsd/i (RbConfig::CONFIG['host_os'] =~ unix) != nil end |
.windows? ⇒ Boolean
10 11 12 13 14 |
# File 'lib/kvetch/os.rb', line 10 def self.windows? windows = /cygwin|mswin|mingw|bccwin|wince|emx/i (RbConfig::CONFIG['host_os'] =~ windows) != nil end |