module OS

Finds out the current Operating System.

Public Class Methods

linux?() click to toggle source
# File lib/teller/os.rb, line 28
def self.linux?
  linux = /linux/i

  (RbConfig::CONFIG['host_os'] =~ linux) != nil
end
mac?() click to toggle source
# File lib/teller/os.rb, line 16
def self.mac?
  mac = /darwin|mac os/i

  (RbConfig::CONFIG['host_os'] =~ mac) != nil
end
unix?() click to toggle source
# File lib/teller/os.rb, line 22
def self.unix?
  unix = /solaris|bsd/i

  (RbConfig::CONFIG['host_os'] =~ unix) != nil
end
windows?() click to toggle source
# File lib/teller/os.rb, line 10
def self.windows?
  windows = /cygwin|mswin|mingw|bccwin|wince|emx/i

  (RbConfig::CONFIG['host_os'] =~ windows) != nil
end