Class: Arrow::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/arrow/table.rb

Instance Method Summary collapse

Instance Method Details

#columnsObject



25
26
27
# File 'lib/arrow/table.rb', line 25

def columns
  each_column.to_a
end

#each_column(&block) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/arrow/table.rb', line 17

def each_column(&block)
  return to_enum(__method__) unless block_given?

  n_columns.times do |i|
    yield(get_column(i))
  end
end