lib/sycsvpro/join.rb
def create_joiners(j, c, p)
        js = j.split(';').collect { |j| j.split('=').collect { |j| j.to_i } }
        cs = c.split(';').collect { |c| c.split(',').collect { |c| c.to_i } }
        ps = col_positions(p, cs)

        @joiners = []
        (0...js.size).each do |i| 
          @joiners << Joiner.new(js[i], ps[i], cs[i], { rows: { } }) 
        end 

        ps.flatten
      end
def create_joiners(j, c, p)
        js = j.split(';').collect { |j| j.split('=').collect { |j| j.to_i } }
        cs = c.split(';').collect { |c| c.split(',').collect { |c| c.to_i } }
        ps = col_positions(p, cs)

        @joiners = []
        (0...js.size).each do |i| 
          @joiners << Joiner.new(js[i], ps[i], cs[i], { rows: { } }) 
        end 

        ps.flatten
      end
def create_joiners ( j , c , p ) js = j . split ( ';' ) . collect { | j | j . split ( '=' ) . collect { | j | j . to_i } } cs = c . split ( ';' ) . collect { | c | c . split ( ',' ) . collect { | c | c . to_i } } ps = col_positions ( p , cs ) @joiners = [ ] ( 0 ... js . size ) . each do | i | @joiners << Joiner . new ( js [ i ] , ps [ i ] , cs [ i ] , { rows : { } } ) end ps . flatten end
Initializes joiners based on joins, positions and columns

 Possible input forms are:
 joins:: "4=0;4=1" or "4=1"
 positions:: "1,2;4,5" or "1,2"
 columns:: "1,2;3,4"

 This has the semantic of 'insert columns 1 and 2 at positions 1 and 2
 for key 0 and columns 3 and 4 at positions 4 and 5 for key 1. Key 4 is
 the corresponding value in the source file

 Return value:: positions where to insert values from source file
Initializes joiners based on joins positions and columns