Class: Parqueteur::Column
- Inherits:
-
Object
- Object
- Parqueteur::Column
- Defined in:
- lib/parqueteur/column.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #arrow_type ⇒ Object
-
#initialize(name, type, options = {}, &block) ⇒ Column
constructor
A new instance of Column.
- #to_arrow_field ⇒ Object
Constructor Details
#initialize(name, type, options = {}, &block) ⇒ Column
Returns a new instance of Column.
7 8 9 10 11 |
# File 'lib/parqueteur/column.rb', line 7 def initialize(name, type, = {}, &block) @name = name.to_s @type = Parqueteur::TypeResolver.resolve(type, , &block) @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/parqueteur/column.rb', line 5 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/parqueteur/column.rb', line 5 def @options end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/parqueteur/column.rb', line 5 def type @type end |
Instance Method Details
#arrow_type ⇒ Object
13 14 15 |
# File 'lib/parqueteur/column.rb', line 13 def arrow_type @type.arrow_type end |
#to_arrow_field ⇒ Object
17 18 19 |
# File 'lib/parqueteur/column.rb', line 17 def to_arrow_field Arrow::Field.new(name, arrow_type) end |