module FFI::Platform

This module defines different constants and class methods to play with various platforms.

Constants

ARCH
CONF_DIR
IS_BSD
IS_FREEBSD
IS_GNU
IS_LINUX
IS_MAC
IS_OPENBSD
IS_WINDOWS
LIBC
LIBPREFIX
LIBSUFFIX
NAME
OS

Public Class Methods

bsd?() click to toggle source

Test if current OS is a *BSD (include MAC) @return [Boolean]

# File lib/ffi/platform.rb, line 116
def self.bsd?
  IS_BSD
end
mac?() click to toggle source

Test if current OS is Mac OS @return [Boolean]

# File lib/ffi/platform.rb, line 128
def self.mac?
  IS_MAC
end
unix?() click to toggle source

Test if current OS is a unix OS @return [Boolean]

# File lib/ffi/platform.rb, line 134
def self.unix?
  !IS_WINDOWS
end
windows?() click to toggle source

Test if current OS is Windows @return [Boolean]

# File lib/ffi/platform.rb, line 122
def self.windows?
  IS_WINDOWS
end