# File csv/writer.rb, line 23 def <<(row) case row when Row row = row.fields when Hash row = @headers.collect {|header| row[header]} end @headers ||= row if @use_headers @lineno += 1 row = @fields_converter.convert(row, nil, lineno) if @fields_converter converted_row = row.collect do |field| quote(field) end line = converted_row.join(@column_separator) + @row_separator if @output_encoding line = line.encode(@output_encoding) end @output << line self end