module OS

detect operating system

Public Class Methods

linux?() click to toggle source
# File lib/config.rb, line 14
def OS.linux?
  not (OS.windows? or OS.mac?)
end
mac?() click to toggle source
# File lib/config.rb, line 10
def OS.mac?
  (/darwin/ =~ RUBY_PLATFORM) != nil
end
windows?() click to toggle source
# File lib/config.rb, line 6
def OS.windows?
  (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
end