Module: H3::Bindings::Base

Included in:
Private, Hierarchy, Inspection, Miscellaneous, Regions, Traversal, UnidirectionalEdges
Defined in:
lib/h3/bindings/base.rb

Overview

Base for FFI Bindings.

When extended, this module sets up FFI to use the H3 C library.

Class Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



7
8
9
10
11
12
# File 'lib/h3/bindings/base.rb', line 7

def self.extended(base)
  base.extend FFI::Library
  base.ffi_lib ["libh3", "libh3.1"]
  base.typedef :ulong_long, :h3_index
  base.const_set('H3_INDEX', :ulong_long)
end