Class: Zip64::EventMachineWriter

Inherits:
ZipWriter show all
Defined in:
lib/zip64/writer.rb

Instance Method Summary collapse

Methods inherited from ZipWriter

#add_entry, #add_link, #close, #ensure_metadata, get_io_size, #initialize, #local_header_max, #make_entry, #make_entry32, #make_entry64, predict_size64, #threshold, #write_central_directory, #write_end_of_central_directory_record, #write_zip64_end_of_central_directory, #write_zip64_end_of_central_directory_locator

Constructor Details

This class inherits a constructor from Zip64::ZipWriter

Instance Method Details

#write_last(bytes = nil) ⇒ Object



391
392
393
394
395
# File 'lib/zip64/writer.rb', line 391

def write_last(bytes=nil)
	bytes = bytes.to_string if bytes.respond_to?(:to_string)
	write_raw(bytes) unless bytes.nil? or bytes.empty?
	@io.close_connection_after_writing
end

#write_raw(bytes) ⇒ Object



387
388
389
390
# File 'lib/zip64/writer.rb', line 387

def write_raw(bytes)
	@io.send_data(bytes)
	@offset += bytes.size
end