Class: DataTransport::DataStore::CSVFile
- Inherits:
-
File
- Object
- DataTransport::DataStore
- File
- DataTransport::DataStore::CSVFile
- Defined in:
- lib/data_transport/data_store/csv_file.rb
Overview
Identical to the File data store, except that it is preconfigured to read and write CSV files.
Instance Attribute Summary
Attributes inherited from File
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ CSVFile
constructor
Accepts the same options as the File data store, except that the following options have different defaults:.
Methods inherited from File
#count, #each_record, #write_record
Methods inherited from DataTransport::DataStore
#count, #each_record, #finalize, #reset, #write_record
Constructor Details
#initialize(options = {}) ⇒ CSVFile
Accepts the same options as the File data store, except that the following options have different defaults:
- delimiter
-
“,”
- enclosure
-
“"”
- escape
-
:double
These defaults describe the CSV format.
15 16 17 18 19 20 21 |
# File 'lib/data_transport/data_store/csv_file.rb', line 15 def initialize( = {}) super({ :delimiter => ",", :enclosure => "\"", :escape => :double }.merge()) end |