Class: Arrow::Schema
- Inherits:
-
Object
- Object
- Arrow::Schema
- Includes:
- FieldContainable
- Defined in:
- lib/arrow/schema.rb
Instance Method Summary collapse
-
#initialize(fields) ⇒ Schema
constructor
Creates a new Schema.
- #to_s(show_metadata: false) ⇒ Object
- #to_s_raw ⇒ Object
Methods included from FieldContainable
Constructor Details
#initialize(fields) ⇒ Schema #initialize(fields) ⇒ Schema
Creates a new Arrow::Schema.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/arrow/schema.rb', line 78 def initialize(fields) case fields when ::Array fields = fields.collect do |field| field = Field.new(field) unless field.is_a?(Field) field end when Hash fields = fields.collect do |name, data_type| Field.new(name, data_type) end end initialize_raw(fields) end |
Instance Method Details
#to_s(show_metadata: false) ⇒ Object
96 97 98 |
# File 'lib/arrow/schema.rb', line 96 def to_s(show_metadata: false) () end |
#to_s_raw ⇒ Object
95 |
# File 'lib/arrow/schema.rb', line 95 alias_method :to_s_raw, :to_s |