Class: H3::Bindings::Types::Resolution

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Defined in:
lib/h3/bindings/types.rb

Overview

A H3 resolution value.

Integer, but must be between 0 and 15 inclusive.

Class Method Summary collapse

Class Method Details

.to_native(value, _context) ⇒ Object



16
17
18
19
# File 'lib/h3/bindings/types.rb', line 16

def to_native(value, _context)
  failure unless value.is_a?(Integer) && RES_RANGE.cover?(value)
  value
end