Class: FileWriter::Excel
- Inherits:
-
Connector::ExcelWriteConnector
- Object
- Connector::ExcelWriteConnector
- FileWriter::Excel
- Defined in:
- lib/mylookup/writer.rb
Overview
Contains the functionalities of writing data in Excel
Instance Attribute Summary
Attributes inherited from Connector::ExcelWriteConnector
Instance Method Summary collapse
-
#initialize(path, data, header) ⇒ Excel
constructor
A new instance of Excel.
- #write ⇒ Object
Constructor Details
#initialize(path, data, header) ⇒ Excel
Returns a new instance of Excel.
10 11 12 13 14 |
# File 'lib/mylookup/writer.rb', line 10 def initialize(path, data, header) super(path) @data = data @header = header end |
Instance Method Details
#write ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/mylookup/writer.rb', line 16 def write puts "Writing Data in Excel" begin write_header write_data rescue StandardError => err puts "[Error]: Error occured while writing in Excel!!!" puts err end end |