class Xlsxtream::IO::RubyZip
Public Class Methods
new(io)
click to toggle source
# File lib/xlsxtream/io/rubyzip.rb, line 8 def initialize(io) unless io.respond_to? :pos and io.respond_to? :pos= raise Error, 'IO is not seekable' end io.binmode if io.respond_to? :binmode stream = true @zos = Zip::OutputStream.new(io, stream) end
Public Instance Methods
<<(data)
click to toggle source
# File lib/xlsxtream/io/rubyzip.rb, line 17 def <<(data) @zos << data end
add_file(path)
click to toggle source
# File lib/xlsxtream/io/rubyzip.rb, line 21 def add_file(path) @zos.put_next_entry path end
close()
click to toggle source
# File lib/xlsxtream/io/rubyzip.rb, line 25 def close os = @zos.close_buffer os.flush if os.respond_to? :flush end