Hello, I am writing a Ruby script to generate a CSV file. My understanding is that each line in a CSV file is a row in a table.
Right now my script generates something looks like this
Vancouver, Calgary,
Routes1,
Routes2,
Routes3,
Vancouver, Toronto
etc,
etc,
etc
but I need it to make it look like this to import it to a DB
Vancouver, Calgary, Routes1, Routes2, Routes3
Vancouver, Toronto, etc etc etc..
My script works by looking up Vancouver and Calgary from raw data that contains the locations of the routes in different files. Then the script goes to those files to look for actual routes. Each time it finds a route (eg. Route1), the script outputs it using "puts" method. The problem is that every output is on a new line.
Is there a way to suppress the new line command when using "puts" command?