Class: ArrowFormat::StructType
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
Instance Method Summary collapse
- #build_array(size, validity_buffer, children) ⇒ Object
-
#initialize(children) ⇒ StructType
constructor
A new instance of StructType.
- #name ⇒ Object
- #to_flatbuffers ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(children) ⇒ StructType
Returns a new instance of StructType.
886 887 888 889 |
# File 'lib/arrow-format/type.rb', line 886 def initialize(children) super() @children = children end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
885 886 887 |
# File 'lib/arrow-format/type.rb', line 885 def children @children end |
Instance Method Details
#build_array(size, validity_buffer, children) ⇒ Object
895 896 897 |
# File 'lib/arrow-format/type.rb', line 895 def build_array(size, validity_buffer, children) StructArray.new(self, size, validity_buffer, children) end |
#name ⇒ Object
891 892 893 |
# File 'lib/arrow-format/type.rb', line 891 def name "Struct" end |
#to_flatbuffers ⇒ Object
906 907 908 |
# File 'lib/arrow-format/type.rb', line 906 def to_flatbuffers FB::Struct::Data.new end |
#to_s ⇒ Object
899 900 901 902 903 904 |
# File 'lib/arrow-format/type.rb', line 899 def to_s fields = children.collect do |child| "#{child.name}: #{child.type}" end "#{super}<#{fields.join(", ")}>" end |