Class: ArrowFormat::Org::Apache::Arrow::Flatbuf::FloatingPoint

Inherits:
FlatBuffers::Table
  • Object
show all
Defined in:
lib/arrow-format/org/apache/arrow/flatbuf/floating_point.rb

Constant Summary collapse

FIELDS =
{
  precision: ::FlatBuffers::Field.new(:precision, 0, 4, :short, 0),
}
Data =
define_data_class

Instance Method Summary collapse

Instance Method Details

#precisionObject



22
23
24
25
26
27
28
29
30
# File 'lib/arrow-format/org/apache/arrow/flatbuf/floating_point.rb', line 22

def precision
  field_offset = @view.unpack_virtual_offset(4)
  if field_offset.zero?
    enum_value = 0
  else
    enum_value = @view.unpack_short(field_offset)
  end
  ::ArrowFormat::Org::Apache::Arrow::Flatbuf::Precision.try_convert(enum_value) || enum_value
end