module OS

Public Class Methods

arm?() click to toggle source
# File lib/a-commons.rb, line 1396
def OS.arm?
 (/arm/ =~ RUBY_PLATFORM) != nil
end
freebsd?() click to toggle source
# File lib/a-commons.rb, line 1392
def OS.freebsd?
 (/freebsd/ =~ RUBY_PLATFORM) != nil
end
linux?() click to toggle source
# File lib/a-commons.rb, line 1388
def OS.linux?
  OS.unix? and not OS.mac?
end
mac?() click to toggle source
# File lib/a-commons.rb, line 1380
def OS.mac?
 (/darwin/ =~ RUBY_PLATFORM) != nil
end
unix?() click to toggle source
# File lib/a-commons.rb, line 1384
def OS.unix?
  !OS.windows?
end
windows?() click to toggle source
# File lib/a-commons.rb, line 1376
def OS.windows?
  (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
end