Sha256: bb8f75937d3bc1f9b5c052e0e9dad386d77b66a3852dde586c80f727e2129a33

Contents?: true

Size: 473 Bytes

Versions: 3

Compression:

Stored size: 473 Bytes

Contents

# dependencies
require "ffi"

# modules
require "libmf/model"
require "libmf/version"

module Libmf
  class Error < StandardError; end

  class << self
    attr_accessor :ffi_lib
  end
  lib_path =
    if ::FFI::Platform.windows?
      "../vendor/libmf/windows/mf.dll"
    elsif ::FFI::Platform.mac?
      "libmf.bundle"
    else
      "libmf.so"
    end
  self.ffi_lib = [File.expand_path(lib_path, __dir__)]

  # friendlier error message
  autoload :FFI, "libmf/ffi"
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
libmf-0.1.3 lib/libmf.rb
libmf-0.1.2 lib/libmf.rb
libmf-0.1.1 lib/libmf.rb