Class: ArrowFormat::Schema
- Inherits:
-
Object
- Object
- ArrowFormat::Schema
- Defined in:
- lib/arrow-format/schema.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#message_metadata ⇒ Object
readonly
Returns the value of attribute message_metadata.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#initialize(fields, metadata: nil, message_metadata: nil) ⇒ Schema
constructor
A new instance of Schema.
- #to_flatbuffers ⇒ Object
Constructor Details
#initialize(fields, metadata: nil, message_metadata: nil) ⇒ Schema
Returns a new instance of Schema.
22 23 24 25 26 |
# File 'lib/arrow-format/schema.rb', line 22 def initialize(fields, metadata: nil, message_metadata: nil) @fields = fields @metadata = @message_metadata = end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
19 20 21 |
# File 'lib/arrow-format/schema.rb', line 19 def fields @fields end |
#message_metadata ⇒ Object (readonly)
Returns the value of attribute message_metadata.
21 22 23 |
# File 'lib/arrow-format/schema.rb', line 21 def @message_metadata end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
20 21 22 |
# File 'lib/arrow-format/schema.rb', line 20 def @metadata end |
Instance Method Details
#to_flatbuffers ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/arrow-format/schema.rb', line 28 def to_flatbuffers fb_schema = FB::Schema::Data.new fb_schema.endianness = FB::Endianness::LITTLE fb_schema.fields = fields.collect(&:to_flatbuffers) fb_schema. = FB.(@metadata) # fb_schema.features = @features fb_schema end |