Class: Arrow::Array

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/arrow/array.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(values) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/arrow/array.rb', line 20

def new(values)
  builder_class_name = "#{name}Builder"
  if const_defined?(builder_class_name)
    builder_class = const_get(builder_class_name)
    builder_class.build(values)
  else
    super
  end
end

Instance Method Details

#eachObject



31
32
33
34
35
# File 'lib/arrow/array.rb', line 31

def each
  length.times do |i|
    yield(self[i])
  end
end

#to_arrowObject



37
38
39
# File 'lib/arrow/array.rb', line 37

def to_arrow
  self
end