lib/sycsvpro/mapper.rb
def init_col_filter(columns, source)
        if columns.nil?
          File.open(source, 'r').each do |line| 
            line = unstring(line)
            next if line.empty?
            line += ' ' if line =~ /;$/
            size = line.split(';').size
            columns = "0-#{size-1}"
            break
          end
        end
        ColumnFilter.new(columns).filter.flatten
      end
def init_col_filter(columns, source)
        if columns.nil?
          File.open(source, 'r').each do |line| 
            line = unstring(line)
            next if line.empty?
            line += ' ' if line =~ /;$/
            size = line.split(';').size
            columns = "0-#{size-1}"
            break
          end
        end
        ColumnFilter.new(columns).filter.flatten
      end
def init_col_filter ( columns , source ) if columns . nil? File . open ( source , 'r' ) . each do | line | line = unstring ( line ) next if line . empty? line += ' ' if line =~ / / size = line . split ( ';' ) . size columns = "0-#{size-1}" break end end ColumnFilter . new ( columns ) . filter . flatten end
Initialize the col_filter that contains columns to be considered for
 mapping. If no columns are provided, that is being empty, a filter with
 all columns is returned
Initialize the col_filter that contains columns to be considered for mapping . If no columns are provided that is being empty a filter with all columns is returned