lib/sycsvpro/join.rb
def create_lookup_table
        File.open(source).each_with_index do |line|
          next if line.chomp.empty?

          values = unstring(line).chomp.split(';')

          next if values.empty?

          @joiners.each do |joiner|
            key = values[joiner.join[0]]
            joiner.lookup[:rows][key] = []

            joiner.cols.each do |i|
              joiner.lookup[:rows][key] << values[i]
            end
          end

        end
      end
def create_lookup_table
        File.open(source).each_with_index do |line|
          next if line.chomp.empty?

          values = unstring(line).chomp.split(';')

          next if values.empty?

          @joiners.each do |joiner|
            key = values[joiner.join[0]]
            joiner.lookup[:rows][key] = []

            joiner.cols.each do |i|
              joiner.lookup[:rows][key] << values[i]
            end
          end

        end
      end
def create_lookup_table File . open ( source ) . each_with_index do | line | next if line . chomp . empty? values = unstring ( line ) . chomp . split ( ';' ) next if values . empty? @joiners . each do | joiner | key = values [ joiner . join [ 0 ] ] joiner . lookup [ :rows ] [ key ] = [ ] joiner . cols . each do | i | joiner . lookup [ :rows ] [ key ] << values [ i ] end end end end
Creates a lookup table from the source file values. The join column of
 the source file is the key
Creates a lookup table from the source file values . The join column of the source file is the key