Class: Xlsxrb::Ooxml::WorkbookWriter::ZipEntryIO

Inherits:
Object
  • Object
show all
Defined in:
lib/xlsxrb/ooxml/workbook_writer.rb

Overview

Wraps a ZipWriter entry to provide a standard IO-like #write interface.

Instance Method Summary collapse

Constructor Details

#initialize(zip) ⇒ ZipEntryIO

Returns a new instance of ZipEntryIO.



20
21
22
# File 'lib/xlsxrb/ooxml/workbook_writer.rb', line 20

def initialize(zip)
  @zip = zip
end

Instance Method Details

#write(data) ⇒ Object Also known as: <<



24
25
26
# File 'lib/xlsxrb/ooxml/workbook_writer.rb', line 24

def write(data)
  @zip.write_data(data)
end