Class: Csv2hash::Adapter::CsvAdapter
- Inherits:
-
Abstract
- Object
- Abstract
- Csv2hash::Adapter::CsvAdapter
- Defined in:
- lib/csv2hash/adapters/csv_adapter.rb
Instance Attribute Summary (collapse)
-
- (Object) file_path
Returns the value of attribute file_path.
Instance Method Summary (collapse)
-
- (CsvAdapter) initialize(file_path)
constructor
A new instance of CsvAdapter.
- - (Object) source
Constructor Details
- (CsvAdapter) initialize(file_path)
Returns a new instance of CsvAdapter
11 12 13 |
# File 'lib/csv2hash/adapters/csv_adapter.rb', line 11 def initialize file_path self.file_path = file_path end |
Instance Attribute Details
- (Object) file_path
Returns the value of attribute file_path
9 10 11 |
# File 'lib/csv2hash/adapters/csv_adapter.rb', line 9 def file_path @file_path end |
Instance Method Details
- (Object) source
15 16 17 |
# File 'lib/csv2hash/adapters/csv_adapter.rb', line 15 def source CSV.read self.file_path end |