Class: ArrowFormat::IntType

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

#to_s

Constructor Details

#initialize(bit_width, signed) ⇒ IntType

Returns a new instance of IntType.



72
73
74
75
76
# File 'lib/arrow-format/type.rb', line 72

def initialize(bit_width, signed)
  super()
  @bit_width = bit_width
  @signed = signed
end

Instance Attribute Details

#bit_widthObject (readonly)

Returns the value of attribute bit_width.



71
72
73
# File 'lib/arrow-format/type.rb', line 71

def bit_width
  @bit_width
end

Instance Method Details

#signed?Boolean

Returns:

  • (Boolean)


78
79
80
# File 'lib/arrow-format/type.rb', line 78

def signed?
  @signed
end

#to_flatbuffersObject



82
83
84
85
86
87
# File 'lib/arrow-format/type.rb', line 82

def to_flatbuffers
  fb_type = FB::Int::Data.new
  fb_type.bit_width = @bit_width
  fb_type.signed = @signed
  fb_type
end