Class: EPUB::OCF::PhysicalContainer::Zipruby

Inherits:
EPUB::OCF::PhysicalContainer show all
Defined in:
lib/epub/maker/ocf/physical_container/zipruby.rb

Instance Method Summary collapse

Methods inherited from EPUB::OCF::PhysicalContainer

mtime, mtime=, save, write

Instance Method Details

#write(path_name, content, mtime: nil) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/epub/maker/ocf/physical_container/zipruby.rb', line 7

def write(path_name, content, mtime: nil)
  if @archive
    @archive.add_or_replace_buffer path_name, content
  else
    open {|container| container.write(path_name, content)}
  end
end