# File lib/ole/storage/base.rb, line 294 def clear # initialize to equivalent of loading an empty ole document. Log.warn 'creating new ole storage object on non-writable io' unless @writeable @header = Header.new @bbat = AllocationTable::Big.new self @root = Dirent.new self, :type => :root, :name => 'Root Entry' @dirents = [@root] @root.idx = 0 @sb_file.close if @sb_file @sb_file = RangesIOResizeable.new @bbat, :first_block => AllocationTable::EOC @sbat = AllocationTable::Small.new self # throw everything else the hell away @io.truncate 0 end