Sha256: 501e7e5ae468ede17f24f8fbbb553418d5f1d8e6f321d6126ab122a590351942

Contents?: true

Size: 309 Bytes

Versions: 10

Compression:

Stored size: 309 Bytes

Contents

module Ngt
  module Utils
    # private
    def self.ffi(method, *args)
      res = FFI.send(method, *args)
      message = FFI.ngt_get_error_string(args.last)
      raise Error, message unless message.empty?
      res
    end

    private

    def ffi(*args)
      Utils.ffi(*args, @error)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ngt-0.4.0 lib/ngt/utils.rb
ngt-0.3.3 lib/ngt/utils.rb
ngt-0.3.2 lib/ngt/utils.rb
ngt-0.3.1 lib/ngt/utils.rb
ngt-0.3.0 lib/ngt/utils.rb
ngt-0.2.4 lib/ngt/utils.rb
ngt-0.2.3 lib/ngt/utils.rb
ngt-0.2.2 lib/ngt/utils.rb
ngt-0.2.1 lib/ngt/utils.rb
ngt-0.2.0 lib/ngt/utils.rb