module OS
Gets the current Operating System.
Public Class Methods
linux?()
click to toggle source
# File lib/croesus/platform.rb, line 42 def self.linux? linux = /linux/i (RbConfig::CONFIG['host_os'] =~ linux) != nil end
mac?()
click to toggle source
# File lib/croesus/platform.rb, line 30 def self.mac? mac = /darwin|mac os/i (RbConfig::CONFIG['host_os'] =~ mac) != nil end
unix?()
click to toggle source
# File lib/croesus/platform.rb, line 36 def self.unix? unix = /solaris|bsd/i (RbConfig::CONFIG['host_os'] =~ unix) != nil end
windows?()
click to toggle source
# File lib/croesus/platform.rb, line 24 def self.windows? windows = /cygwin|mswin|mingw|bccwin|wince|emx/i (RbConfig::CONFIG['host_os'] =~ windows) != nil end