Class: Epubber::Generators::Introduction
- Defined in:
- lib/epubber/generators/introduction.rb
Instance Attribute Summary
Attributes inherited from Generator
Instance Method Summary collapse
Methods inherited from Generator
Constructor Details
This class inherits a constructor from Epubber::Generators::Generator
Instance Method Details
#generate ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/epubber/generators/introduction.rb', line 5 def generate # Because this is an optional generator, don't do anything if there's no # introduction in the book return if book.introduction.nil? content = template.parse file: 'OEBPS/Text/introduction.xhtml', context: book_context persist file: 'OEBPS/Text/introduction.xhtml', content: content end |