class Epubber::Generators::Introduction

Public Instance Methods

generate() click to toggle source
# 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