Module: OS
- Defined in:
- lib/hoodie/os.rb
Overview
Finds out the current Operating System.
Class Method Summary collapse
Class Method Details
.linux? ⇒ Boolean
39 40 41 42 |
# File 'lib/hoodie/os.rb', line 39 def self.linux? linux = /linux/i (RbConfig::CONFIG['host_os'] =~ linux) != nil end |
.mac? ⇒ Boolean
29 30 31 32 |
# File 'lib/hoodie/os.rb', line 29 def self.mac? mac = /darwin|mac os/i (RbConfig::CONFIG['host_os'] =~ mac) != nil end |
.unix? ⇒ Boolean
34 35 36 37 |
# File 'lib/hoodie/os.rb', line 34 def self.unix? unix = /solaris|bsd/i (RbConfig::CONFIG['host_os'] =~ unix) != nil end |
.windows? ⇒ Boolean
24 25 26 27 |
# File 'lib/hoodie/os.rb', line 24 def self.windows? windows = /cygwin|mswin|mingw|bccwin|wince|emx/i (RbConfig::CONFIG['host_os'] =~ windows) != nil end |