Class: TabularData::Strategies::CSVStrategy
- Inherits:
-
ReaderStrategy
- Object
- ReaderStrategy
- TabularData::Strategies::CSVStrategy
- Defined in:
- lib/tabular_data.rb
Instance Attribute Summary collapse
-
#column_delimiter ⇒ Object
Returns the value of attribute column_delimiter.
Instance Method Summary collapse
-
#initialize(column_delimiter = ";") ⇒ CSVStrategy
constructor
A new instance of CSVStrategy.
- #parse_attributes(line) ⇒ Object
Methods inherited from ReaderStrategy
Constructor Details
#initialize(column_delimiter = ";") ⇒ CSVStrategy
Returns a new instance of CSVStrategy.
40 41 42 |
# File 'lib/tabular_data.rb', line 40 def initialize(column_delimiter = ";") @column_delimiter = column_delimiter end |
Instance Attribute Details
#column_delimiter ⇒ Object
Returns the value of attribute column_delimiter.
38 39 40 |
# File 'lib/tabular_data.rb', line 38 def column_delimiter @column_delimiter end |
Instance Method Details
#parse_attributes(line) ⇒ Object
48 49 50 |
# File 'lib/tabular_data.rb', line 48 def parse_attributes(line) line.split(column_delimiter) end |