lib/sycsvpro/inserter.rb
def execute
      File.open(outfile, 'w') do |out|
        if position.downcase == 'bottom'
          out.puts File.read(infile)
          out.puts File.read(insert)
        else
          out.puts File.read(insert)
          out.puts File.read(infile)
        end
      end
    end
def execute
      File.open(outfile, 'w') do |out|
        if position.downcase == 'bottom'
          out.puts File.read(infile)
          out.puts File.read(insert)
        else
          out.puts File.read(insert)
          out.puts File.read(infile)
        end
      end
    end
def execute File . open ( outfile , 'w' ) do | out | if position . downcase == 'bottom' out . puts File . read ( infile ) out . puts File . read ( insert ) else out . puts File . read ( insert ) out . puts File . read ( infile ) end end end
Creates an Inserter and takes options infile, outfile, insert-file and position where to
 insert the insert-file content. Default position is top
 Inserts the content of the insert-file at the specified positions (top or bottom)
Creates an Inserter and takes options infile outfile insert - file and position where to insert the insert - file content . Default position is top Inserts the content of the insert - file at the specified positions ( top or bottom )