### Home Classes Methods

### In Files

- lib/ffi/platform.rb

### 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::Function
- 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::StructByReference
- 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
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

[Validate]

Generated with the Darkfish Rdoc Generator 2.