module OS

OS Module

Public Class Methods

linux?() click to toggle source
# File lib/os.rb, line 15
def self.linux?
  unix? && !mac?
end
mac?() click to toggle source
# File lib/os.rb, line 7
def self.mac?
  (/darwin/ =~ RUBY_PLATFORM) != nil
end
unix?() click to toggle source
# File lib/os.rb, line 11
def self.unix?
  !windows?
end
windows?() click to toggle source
# File lib/os.rb, line 3
def self.windows?
  (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
end