Class: ArrowFormat::Int16Type

Inherits:
IntType show all
Defined in:
lib/arrow-format/type.rb

Instance Attribute Summary

Attributes inherited from IntType

#bit_width

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from IntType

#signed?, #to_flatbuffers

Methods inherited from Type

#to_s

Constructor Details

#initializeInt16Type

Returns a new instance of Int16Type.



145
146
147
# File 'lib/arrow-format/type.rb', line 145

def initialize
  super(16, true)
end

Class Method Details

.singletonObject



140
141
142
# File 'lib/arrow-format/type.rb', line 140

def singleton
  @singleton ||= new
end

Instance Method Details

#buffer_typeObject



153
154
155
# File 'lib/arrow-format/type.rb', line 153

def buffer_type
  :s16
end

#build_array(size, validity_buffer, values_buffer) ⇒ Object



157
158
159
# File 'lib/arrow-format/type.rb', line 157

def build_array(size, validity_buffer, values_buffer)
  Int16Array.new(size, validity_buffer, values_buffer)
end

#nameObject



149
150
151
# File 'lib/arrow-format/type.rb', line 149

def name
  "Int16"
end