module Cxxproject::Utils::OS

Simple helper query the operating system we are running in

Public Class Methods

linux?() click to toggle source

Is it linux

# File lib/cxxproject/utils/utils.rb, line 28
def self.linux?
  OS.unix? and not OS.mac?
end
mac?() click to toggle source

Is it osx

# File lib/cxxproject/utils/utils.rb, line 18
def self.mac?
  (RUBY_PLATFORM =~ /darwin/) != nil
end
os() click to toggle source
# File lib/cxxproject/utils/utils.rb, line 6
def self.os
  return :OSX if mac?
  return :WINDOWS if windows?
  return :UNIX
end
unix?() click to toggle source

Is it kind of unix

# File lib/cxxproject/utils/utils.rb, line 23
def self.unix?
  !OS.windows?
end
windows?() click to toggle source

Is it windows

# File lib/cxxproject/utils/utils.rb, line 13
def self.windows?
  (RUBY_PLATFORM =~ /cygwin|mswin|mingw|bccwin|wince|emx/) != nil
end