lib/berkeley_library/tind/export/export.rb
# Writes a spreadsheet in the specified format
# @overload export(collection, format = ExportFormat::CSV)
#   Returns the spreadsheet as a string.
#   @param collection [String] The collection name
#   @param format [ExportFormat, String, Symbol] the export format
#   @param exportable_only [Boolean] whether to include only exportable fields
# @overload export(collection, format = ExportFormat::CSV, out)
#   Writes the spreadsheet to the specified output stream.
#   @param collection [String] The collection name
#   @param format [ExportFormat, String, Symbol] the export format
#   @param out [IO] the output stream
#   @param exportable_only [Boolean] whether to include only exportable fields
# @overload export(collection, format = ExportFormat::CSV, path)
#   Writes the spreadsheet to the specified output file.
#   @param collection [String] The collection name
#   @param format [ExportFormat, String, Symbol] the export format
#   @param path [String, Pathname] the path to the output file
#   @param exportable_only [Boolean] whether to include only exportable fields
# @raise [ExportFailed] if the collection does not exist, or cannot be exported. Note
#   that this error is guaranteed to be raised before anything is written to `out`.
Writes a spreadsheet in the specified format
Writes a spreadsheet in the specified format
def export(collection, format = ExportFormat::CSV, out = nil, exportable_only: true)
          exporter = exporter_for(collection, format, exportable_only: exportable_only)
          exporter.export(out)
        end
def export ( collection , format = ExportFormat :: CSV , out = nil , exportable_only : true ) exporter = exporter_for ( collection , format , exportable_only : exportable_only ) exporter . export ( out ) end
Writes a spreadsheet in the specified format
Writes a spreadsheet in the specified format
# noinspection RubyYardParamTypeMatch
[ExportFailed] if the collection does not exist, or cannot be exported. Note that this error is guaranteed to be raised before anything is written to `out`.
[ ExportFailed ] if the collection does not exist or cannot be exported . Note that this error is guaranteed to be raised before anything is written to ` out ` .
collection
<not_specific>
format
<not_specific>
out
<not_specific>
exportable_only
<not_specific>
overload
export(collection, format = ExportFormat::CSV) Returns the spreadsheet as a string. @param collection [String] The collection name @param format [ExportFormat, String, Symbol] the export format @param exportable_only [Boolean] whether to include only exportable fields
export ( collection format = ExportFormat :: CSV ) Returns the spreadsheet as a string . @param collection [ String ] The collection name @param format [ ExportFormat String Symbol ] the export format @param exportable_only [ Boolean ] whether to include only exportable fields
overload
export(collection, format = ExportFormat::CSV, out) Writes the spreadsheet to the specified output stream. @param collection [String] The collection name @param format [ExportFormat, String, Symbol] the export format @param out [IO] the output stream @param exportable_only [Boolean] whether to include only exportable fields
export ( collection format = ExportFormat :: CSV out ) Writes the spreadsheet to the specified output stream . @param collection [ String ] The collection name @param format [ ExportFormat String Symbol ] the export format @param out [ IO ] the output stream @param exportable_only [ Boolean ] whether to include only exportable fields
overload
export(collection, format = ExportFormat::CSV, path) Writes the spreadsheet to the specified output file. @param collection [String] The collection name @param format [ExportFormat, String, Symbol] the export format @param path [String, Pathname] the path to the output file @param exportable_only [Boolean] whether to include only exportable fields
export ( collection format = ExportFormat :: CSV path ) Writes the spreadsheet to the specified output file . @param collection [ String ] The collection name @param format [ ExportFormat String Symbol ] the export format @param path [ String Pathname ] the path to the output file @param exportable_only [ Boolean ] whether to include only exportable fields