generate_line

generate_line(row, options = Hash.new)
Class Public methods

This method is a shortcut for converting a single row (Array) into a CSV String.

The options parameter can be anything ::new understands. This method understands an additional :encoding parameter to set the base Encoding for the output. This method will try to guess your Encoding from the first non-nil field in row, if possible, but you may need to use this parameter as a backup plan.

The :row_sep option defaults to $INPUT_RECORD_SEPARATOR ($/) when calling this method.

doc_ruby_on_rails
2015-04-01 21:48:36
Comments
Leave a Comment

Please login to continue.