Class: Parqueteur::Type

Inherits:
Object
  • Object
show all
Defined in:
lib/parqueteur/type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}, &block) ⇒ Type

Returns a new instance of Type.



7
8
9
10
11
# File 'lib/parqueteur/type.rb', line 7

def initialize(options = {}, &block)
  @options = options
  @block = block
  @arrow_type = arrow_type_builder
end

Instance Attribute Details

#arrow_typeObject (readonly)

Returns the value of attribute arrow_type.



5
6
7
# File 'lib/parqueteur/type.rb', line 5

def arrow_type
  @arrow_type
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/parqueteur/type.rb', line 5

def options
  @options
end

Instance Method Details

#build_value_array(values) ⇒ Object



13
14
15
# File 'lib/parqueteur/type.rb', line 13

def build_value_array(values)
  raise "#to_arrow_field must be implemented in #{self.class}"
end

#resolve(type, options = {}) ⇒ Object



17
18
19
# File 'lib/parqueteur/type.rb', line 17

def resolve(type, options = {})
  Parqueteur::TypeResolver.resolve(type, options)
end