Module: CSVPlusPlus::Writer
- Defined in:
- lib/csv_plus_plus/writer.rb,
lib/csv_plus_plus/writer/csv.rb,
lib/csv_plus_plus/writer/excel.rb,
lib/csv_plus_plus/writer/base_writer.rb,
lib/csv_plus_plus/writer/google_sheets.rb,
lib/csv_plus_plus/writer/open_document.rb,
lib/csv_plus_plus/writer/rubyxl_builder.rb,
lib/csv_plus_plus/writer/rubyxl_modifier.rb,
lib/csv_plus_plus/writer/file_backer_upper.rb,
lib/csv_plus_plus/writer/google_sheet_builder.rb,
lib/csv_plus_plus/writer/google_sheet_modifier.rb
Overview
Various strategies for writing to various formats (excel, google sheets, CSV, OpenDocument)
Defined Under Namespace
Modules: FileBackerUpper Classes: BaseWriter, CSV, Excel, GoogleSheetBuilder, GoogleSheetModifier, GoogleSheets, OpenDocument, RubyXLBuilder, RubyXLModifier
Class Method Summary collapse
-
.writer(options) ⇒ Object
Return an instance of a writer depending on the given
options.
Class Method Details
.writer(options) ⇒ Object
Return an instance of a writer depending on the given options
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/csv_plus_plus/writer.rb', line 13 def self.writer() return ::CSVPlusPlus::Writer::GoogleSheets.new() if .google case .output_filename when /\.csv$/ then ::CSVPlusPlus::Writer::CSV.new() when /\.ods$/ then ::CSVPlusPlus::Writer::OpenDocument.new() when /\.xl(sx|sm|tx|tm)$/ then ::CSVPlusPlus::Writer::Excel.new() else raise(::CSVPlusPlus::Error, "Unsupported file extension: #{.output_filename}") end end |