### Home Classes Methods

### In Files

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

### Methods

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

### Files

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

### Class/Module Index

Quicksearch

- FFI
- FFI::AutoPointer
- FFI::AutoPointer::CallableReleaser
- FFI::AutoPointer::DefaultReleaser
- FFI::AutoPointer::Releaser
- FFI::ConstGenerator
- FFI::ConstGenerator::Constant
- FFI::Enum
- FFI::Enums
- FFI::FunctionType
- FFI::Generator
- FFI::Generator::Task
- FFI::IO
- FFI::Library
- FFI::ManagedStruct
- FFI::NotFoundError
- FFI::Platform
- FFI::PlatformError
- FFI::Pointer
- FFI::StrPtrConverter
- FFI::Struct
- FFI::Struct::ManagedStructConverter
- FFI::StructGenerator
- FFI::StructGenerator::Field
- FFI::StructLayout
- FFI::StructLayout::Array
- FFI::StructLayout::Enum
- FFI::StructLayout::Field
- FFI::StructLayout::Function
- FFI::StructLayout::InnerStruct
- FFI::StructLayout::Mapped
- FFI::StructLayout::Number
- FFI::StructLayout::Pointer
- FFI::StructLayout::String
- 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 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.