Sha256: 01bf044bd455199ffd6a53494cab58898ad1d2c20afe8d5cb8563ef79c30f0ac

Contents?: true

Size: 381 Bytes

Versions: 22

Compression:

Stored size: 381 Bytes

Contents

module SuperFormatter
  class Import < SuperProcess::Core
    init :spreadsheet
    attr_accessor :head, :rows, :orders

    protected

    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
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
super_tools-3.0.1 lib/super_formatter/import.rb
super_tools-2.1.0 lib/super_formatter/import.rb
super_tools-0.0.26 lib/super_formatter/import.rb
super_tools-0.0.25 lib/super_formatter/import.rb
super_tools-0.0.21 lib/super_formatter/import.rb
super_tools-0.0.20 lib/super_formatter/import.rb
super_tools-0.0.17 lib/super_formatter/import.rb
super_tools-0.0.15 lib/super_formatter/import.rb
super_tools-0.0.14 lib/super_formatter/import.rb
super_tools-0.0.13 lib/super_formatter/import.rb
super_tools-0.0.12 lib/super_formatter/import.rb
super_tools-0.0.11 lib/super_formatter/import.rb
super_tools-0.0.10 lib/super_formatter/import.rb
super_tools-0.0.9 lib/super_formatter/import.rb
super_tools-0.0.8 lib/super_formatter/import.rb
super_tools-0.0.7 lib/super_formatter/import.rb
super_tools-0.0.6 lib/super_formatter/import.rb
super_tools-0.0.5 lib/super_formatter/import.rb
super_tools-0.0.4 lib/super_formatter/import.rb
super_tools-0.0.3 lib/super_formatter/import.rb