Module: XS::LibXS

Extended by:
FFI::Library
Defined in:
lib/ffi-rxs/libxs.rb

Overview

Wraps the libxs library and attaches to the API functions

Defined Under Namespace

Modules: PollItemLayout Classes: Msg, PollItem

Class Method Summary collapse

Class Method Details

.versionObject



58
59
60
61
62
63
64
65
66
67
68
# File 'lib/ffi-rxs/libxs.rb', line 58

def self.version
  if @version.nil?
    major = FFI::MemoryPointer.new :int
    minor = FFI::MemoryPointer.new :int
    patch = FFI::MemoryPointer.new :int
    LibXS.xs_version major, minor, patch
    @version = {:major => major.read_int, :minor => minor.read_int, :patch => patch.read_int}
  end

  @version
end