Module: BerkeleyLibrary::TIND::Export
- Defined in:
- lib/berkeley_library/tind/export/row.rb,
lib/berkeley_library/tind/export/table.rb,
lib/berkeley_library/tind/export/column.rb,
lib/berkeley_library/tind/export/config.rb,
lib/berkeley_library/tind/export/export.rb,
lib/berkeley_library/tind/export/filter.rb,
lib/berkeley_library/tind/export/exporter.rb,
lib/berkeley_library/tind/export/row_metrics.rb,
lib/berkeley_library/tind/export/column_group.rb,
lib/berkeley_library/tind/export/csv_exporter.rb,
lib/berkeley_library/tind/export/ods_exporter.rb,
lib/berkeley_library/tind/export/export_format.rb,
lib/berkeley_library/tind/export/table_metrics.rb,
lib/berkeley_library/tind/export/export_command.rb,
lib/berkeley_library/tind/export/export_exception.rb,
lib/berkeley_library/tind/export/no_results_error.rb,
lib/berkeley_library/tind/export/column_group_list.rb,
lib/berkeley_library/tind/export/column_width_calculator.rb
Defined Under Namespace
Modules: ColumnWidthCalculator, Config, Filter Classes: CSVExporter, Column, ColumnGroup, ColumnGroupList, ExportCommand, ExportException, ExportFormat, Exporter, NoResultsError, ODSExporter, Row, RowMetrics, Table, TableMetrics
Class Method Summary collapse
-
.export(collection, format = ExportFormat::CSV, out = nil, exportable_only: true) ⇒ Object
Writes a spreadsheet in the specified format.
-
.exporter_for(collection, format, exportable_only: true) ⇒ Exporter
Returns an exporter for the specified spreadsheet in the specified format.
Class Method Details
.export(collection, format = ExportFormat::CSV) ⇒ Object .export(collection, format = ExportFormat::CSV, out) ⇒ Object .export(collection, format = ExportFormat::CSV, path) ⇒ Object
Writes a spreadsheet in the specified format
27 28 29 30 31 |
# File 'lib/berkeley_library/tind/export/export.rb', line 27 def export(collection, format = ExportFormat::CSV, out = nil, exportable_only: true) # noinspection RubyYardParamTypeMatch exporter = exporter_for(collection, format, exportable_only: exportable_only) exporter.export(out) end |
.exporter_for(collection, format, exportable_only: true) ⇒ Exporter
Returns an exporter for the specified spreadsheet in the specified format
38 39 40 41 42 |
# File 'lib/berkeley_library/tind/export/export.rb', line 38 def exporter_for(collection, format, exportable_only: true) export_format = ExportFormat.ensure_format(format) # noinspection RubyNilAnalysis export_format.exporter_for(collection, exportable_only: exportable_only) end |