Class: ArcFurnace::MultiExcelSource
- Defined in:
- lib/arc-furnace/multi_excel_source.rb
Instance Attribute Summary collapse
-
#excel ⇒ Object
readonly
Returns the value of attribute excel.
-
#sheets_info_array ⇒ Object
readonly
Returns the value of attribute sheets_info_array.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Node
#error_handler, #node_id, #params
Instance Method Summary collapse
-
#initialize(sheets_info_array: []) ⇒ MultiExcelSource
constructor
Sheets is in the format of: [ { filename: ‘foo.xlsx’, sheet: ‘sheet name’ }, { filename: ‘foo2.xlsx’, sheet: ‘sheet name’ } ].
Methods inherited from Source
#close, #empty?, #finalize, #prepare, #row
Constructor Details
#initialize(sheets_info_array: []) ⇒ MultiExcelSource
Sheets is in the format of: [
{ filename: 'foo.xlsx', sheet: 'sheet name' },
{ filename: 'foo2.xlsx', sheet: 'sheet name' }
]
The value for the :sheet key points to the sheet that we want to parse. If sheets are not explicitly indicated, they will not be parsed.
19 20 21 22 |
# File 'lib/arc-furnace/multi_excel_source.rb', line 19 def initialize(sheets_info_array: []) @sheets_info_array = sheets_info_array.reverse open_next_file end |
Instance Attribute Details
#excel ⇒ Object (readonly)
Returns the value of attribute excel.
8 9 10 |
# File 'lib/arc-furnace/multi_excel_source.rb', line 8 def excel @excel end |
#sheets_info_array ⇒ Object (readonly)
Returns the value of attribute sheets_info_array.
8 9 10 |
# File 'lib/arc-furnace/multi_excel_source.rb', line 8 def sheets_info_array @sheets_info_array end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
8 9 10 |
# File 'lib/arc-furnace/multi_excel_source.rb', line 8 def value @value end |