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/rubyzip.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



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

def make
  yield self if block_given?
  self
end

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

Overloads:

Yields:

  • (container)


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

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

#saveObject



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

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