### Home Classes Methods

### In Files

- lib/ffi/platform.rb
- ext/ffi_c/ffi.c

### Methods

- ::bsd?
- ::mac?
- ::unix?
- ::windows?

### Files

- Makefile
- LICENSE
- compile
- configure
- depcomp
- stamp-vti
- install-sh
- libtool-version
- mdate-sh
- missing

### Class/Module Index

Quicksearch

- FFI
- FFI::ArrayType
- FFI::AutoPointer
- FFI::AutoPointer::CallableReleaser
- FFI::AutoPointer::DefaultReleaser
- FFI::AutoPointer::Releaser
- FFI::ConstGenerator
- FFI::ConstGenerator::Constant
- FFI::DynamicLibrary
- FFI::DynamicLibrary::Symbol
- FFI::Enum
- FFI::Enums
- FFI::Function
- FFI::Generator
- FFI::Generator::Task
- FFI::IO
- FFI::ManagedStruct
- FFI::Platform
- FFI::PlatformError
- FFI::Pointer
- FFI::StrPtrConverter
- FFI::Struct
- FFI::Struct::InlineArray
- FFI::Struct::ManagedStructConverter
- FFI::StructByReference
- FFI::StructByValue
- FFI::StructGenerator
- FFI::StructGenerator::Field
- FFI::StructLayout
- FFI::StructLayout::Enum
- FFI::StructLayout::InnerStruct
- FFI::StructLayout::Mapped
- FFI::StructLayoutBuilder
- FFI::TypesGenerator
- FFI::Union
- FFI::VariadicInvoker

No matching classes.

# FFI::Platform

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

### Constants

ARCH
BIG_ENDIAN
BYTE_ORDER
CONF_DIR
CPU
GNU_LIBC
IS_BSD
IS_FREEBSD
IS_GNU
IS_LINUX
IS_MAC
IS_OPENBSD
IS_WINDOWS
LIBC
LIBPREFIX
LIBSUFFIX
LITTLE_ENDIAN
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 125
    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 137
    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 143
    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 131
    def self.windows?
      IS_WINDOWS
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.