class SuperFormatter::Import

Attributes

head[RW]
orders[RW]
rows[RW]

Protected Instance Methods

build_rows!(head_klass, row_klass) click to toggle source
# File lib/super_formatter/import.rb, line 8
def build_rows!(head_klass, row_klass)
  self.head = head_klass.new(spreadsheet.result.shift)
  self.rows = spreadsheet.result.map.with_index do |data, i|
    row_klass.new(data, head.indexes)
  end.compact
end