Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4623

Rails - a way to check the last line while using smarter_csv gem

$
0
0

I am using smarter_csv gem to parse a large CSV file on Heroku.

SmarterCSV.process(file_name, { chunk_size: 10, headers_in_file: false, user_provided_headers: user_provided_headers }) do |chunk|  chunk.each do |row|    # parse row  endend

Is there any way to check if the row is the last line?


Viewing all articles
Browse latest Browse all 4623


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>