Class: EPUB::OCF

Inherits:
Object
  • Object
show all
Defined in:
lib/epub/maker/ocf.rb,
lib/epub/maker/ocf/physical_container.rb,
lib/epub/maker/ocf/physical_container/zipruby.rb,
lib/epub/maker/ocf/physical_container/archive_zip.rb

Defined Under Namespace

Classes: Container, PhysicalContainer

Constant Summary collapse

DIRECTORY =
'META-INF'

Instance Method Summary collapse

Instance Method Details

#make {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (EPUB::OCF)

    the object that the method was called on



9
10
11
12
# File 'lib/epub/maker/ocf.rb', line 9

def make
  yield self if block_given?
  self
end

#make_containerContainer #make_container {|container| ... } ⇒ Container

Overloads:

Yields:

  • (container)


24
25
26
27
28
# File 'lib/epub/maker/ocf.rb', line 24

def make_container
  self.container = Container.new
  yield container if block_given?
  container
end

#saveObject



14
15
16
# File 'lib/epub/maker/ocf.rb', line 14

def save
  book.container_adapter.write book.epub_file, File.join(DIRECTORY, Container::FILE), self.container.to_xml if self.container
end