Class: Epubber::Generators::Toc

Inherits:
Epubber::Generator show all
Defined in:
lib/epubber/generators/toc.rb

Instance Attribute Summary

Attributes inherited from Epubber::Generator

#book, #filename, #working_dir

Instance Method Summary collapse

Methods inherited from Epubber::Generator

#initialize, #register_generators

Constructor Details

This class inherits a constructor from Epubber::Generator

Instance Method Details

#generateObject



5
6
7
8
9
10
11
# File 'lib/epubber/generators/toc.rb', line 5

def generate
  content = template.parse file: 'OEBPS/toc.ncx', context: book_context
  persist file: 'OEBPS/toc.ncx', content: content

  content = template.parse file: 'OEBPS/Text/toc.xhtml', context: book_context
  persist file: 'OEBPS/Text/toc.xhtml', content: content
end