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.



22
23
24
# File 'lib/xlsxrb/ooxml/workbook_writer.rb', line 22

def initialize(zip)
  @zip = zip
end

Instance Method Details

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



26
27
28
# File 'lib/xlsxrb/ooxml/workbook_writer.rb', line 26

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