Class: Pal::Operation::CsvExporterImpl
- Inherits:
-
BaseExportHandler
- Object
- BaseExportHandler
- Pal::Operation::CsvExporterImpl
- Includes:
- FileExportable
- Defined in:
- lib/pal/operation/exporter.rb
Instance Attribute Summary
Attributes inherited from BaseExportHandler
Instance Method Summary collapse
Methods included from FileExportable
Methods inherited from BaseExportHandler
Methods included from Log
#log_debug, #log_error, #log_info, #log_warn
Methods included from Configuration
Constructor Details
This class inherits a constructor from Pal::Operation::BaseExportHandler
Instance Method Details
#_export(rows, column_headers) ⇒ Object
154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/pal/operation/exporter.rb', line 154 def _export(rows, column_headers) file_contents = [] file_contents << column_headers.keys.join(",") rows.each do |row| file_contents << row.join(",") end write_to_file( @settings["output_dir"], @settings["file_name"] || "pal", "csv", file_contents.join("\n") ) end |