Method: Odf::Utils::File.output_stream
- Defined in:
- lib/odf/utils/file.rb
.output_stream(document) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/odf/utils/file.rb', line 19 def output_stream(document) Zip::OutputStream.write_buffer do |io| document.image_set.each do |image| io.put_next_entry(image.path) io.write(image.content) end document.components.each do |component_name| component = document.send(component_name) io.put_next_entry(component.name) io.write(component.content) end end end |