Class: DataFile::Reader
- Inherits:
-
Object
- Object
- DataFile::Reader
- Defined in:
- lib/data_file/reader.rb,
lib/data_file/reader/csv.rb,
lib/data_file/reader/base.rb,
lib/data_file/reader/excel.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #detector ⇒ Object
-
#initialize(file_path, options = {}) ⇒ Reader
constructor
A new instance of Reader.
- #parser ⇒ Object
Constructor Details
#initialize(file_path, options = {}) ⇒ Reader
Returns a new instance of Reader.
7 8 9 10 |
# File 'lib/data_file/reader.rb', line 7 def initialize(file_path, = {}) @options = { headers: true }.merge() @file_path = file_path end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
5 6 7 |
# File 'lib/data_file/reader.rb', line 5 def file @file end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
5 6 7 |
# File 'lib/data_file/reader.rb', line 5 def file_path @file_path end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/data_file/reader.rb', line 5 def @options end |