### Home Classes Methods

### In Files

- lib/ffi/platform.rb

### 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::AbstractMemory
- FFI::ArrayType
- FFI::AutoPointer
- FFI::AutoPointer::CallableReleaser
- FFI::AutoPointer::DefaultReleaser
- FFI::AutoPointer::Releaser
- FFI::Buffer
- FFI::ConstGenerator
- FFI::ConstGenerator::Constant
- FFI::DataConverter
- FFI::DynamicLibrary
- FFI::DynamicLibrary::Symbol
- FFI::Enum
- FFI::Enums
- FFI::Function
- FFI::FunctionType
- FFI::Generator
- FFI::Generator::Task
- FFI::IO
- FFI::LastError
- FFI::ManagedStruct
- FFI::MemoryPointer
- FFI::NullPointerError
- FFI::Platform
- FFI::PlatformError
- FFI::Pointer
- FFI::StrPtrConverter
- FFI::Struct
- FFI::Struct::ManagedStructConverter
- FFI::StructByReference
- FFI::StructByValue
- 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
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 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.