Method: Ole::Storage#repack
- Defined in:
- lib/ole/storage.rb
#repack(temp = :file) ⇒ Object
could be useful with mis-behaving ole documents. or to just clean them up.
336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/ole/storage.rb', line 336 def repack temp=:file case temp when :file Tempfile.open 'ole-repack' do |io| io.binmode repack_using_io io end when :mem; StringIO.open(&method(:repack_using_io)) else raise ArgumentError, "unknown temp backing #{temp.inspect}" end end |