Flowdock
method

to_csv

Importance_1
v1_9_3_125 - Show latest stable - 1 note - Class: Array
to_csv(options = Hash.new) public

Equivalent to CSV::generate_line(self, options).

Show source
Register or log in to add new notes.
April 29, 2015
0 thanks

Prevent new line character.

To prevent the “\n” character added at the end of each file pass in the “row_sep: nil” option:

[ "some", "array" ].to_csv                 # => "some, array\n"  

[ "some", "array" ].to_csv( row_sep: nil ) # => "some, array"