Class: Inkscape::Merge::DataParser::CSV
- Inherits:
-
Object
- Object
- Inkscape::Merge::DataParser::CSV
- Includes:
- Enumerable
- Defined in:
- lib/inkscape_merge/data_parsers.rb
Overview
CSV file parser Though Ruby’s CSV would suffice, we explicitly wrap it in an API Other parsers must comply to this API
Instance Method Summary collapse
-
#each(&block) ⇒ Object
Wraps CSV#each for enumerable support.
-
#headers ⇒ Object
Return headers as an array.
-
#initialize(data_file, csv_options) ⇒ CSV
constructor
Read file into memory.
Constructor Details
Instance Method Details
#each(&block) ⇒ Object
Wraps CSV#each for enumerable support
43 44 45 |
# File 'lib/inkscape_merge/data_parsers.rb', line 43 def each(&block) @data.each &block end |
#headers ⇒ Object
Return headers as an array
38 39 40 |
# File 'lib/inkscape_merge/data_parsers.rb', line 38 def headers @data.headers end |