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_NETBSD
- IS_OPENBSD
- IS_SOLARIS
- 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 130 def self.bsd? IS_BSD end
mac?()
click to toggle source
solaris?()
click to toggle source
unix?()
click to toggle source
windows?()
click to toggle source
Test if current OS is Windows @return [Boolean]
# File lib/ffi/platform.rb, line 136 def self.windows? IS_WINDOWS end
Private Class Methods
is_os(os)
click to toggle source
@param [String) os @return [Boolean] Test if current OS is os
.
# File lib/ffi/platform.rb, line 79 def self.is_os(os) OS == os end