Class: ArcFurnace::MultiExcelSource

Inherits:
Source show all
Defined in:
lib/arc-furnace/multi_excel_source.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#error_handler, #node_id, #params

Instance Method Summary collapse

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

#excelObject (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_arrayObject (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

#valueObject (readonly)

Returns the value of attribute value.



8
9
10
# File 'lib/arc-furnace/multi_excel_source.rb', line 8

def value
  @value
end