class Parqueteur::Struct
Public Class Methods
new(&block)
click to toggle source
# File lib/parqueteur/struct.rb, line 5 def initialize(&block) instance_exec(&block) end
Public Instance Methods
field(name, type, options = {}, &block)
click to toggle source
# File lib/parqueteur/struct.rb, line 13 def field(name, type, options = {}, &block) fields.add(Parqueteur::Column.new(name, type, options, &block)) end
fields()
click to toggle source
# File lib/parqueteur/struct.rb, line 9 def fields @fields ||= Parqueteur::ColumnCollection.new end
key?(key)
click to toggle source
# File lib/parqueteur/struct.rb, line 17 def key?(key) fields.key?(key) end
to_arrow_type()
click to toggle source
# File lib/parqueteur/struct.rb, line 21 def to_arrow_type fields.collect(&:to_arrow_field) end