Sha256: 41ba291cae6fdcd08f5c7250ed9abe6fa95c9d74d070269ef40bf5851e83a925
Contents?: true
Size: 549 Bytes
Versions: 1
Compression:
Stored size: 549 Bytes
Contents
require 'epubber/generators/generator' module Epubber::Generators class Cover < Generator def generate # Because this is an optional generator, don't do anything if there's no # introduction in the book return if book.cover.nil? content = template.parse file: 'OEBPS/Text/cover.xhtml', context: book_context persist file: 'OEBPS/Text/cover.xhtml', content: content persist file: "OEBPS/Images/#{book_context['book']['cover']['filename']}", content: book_context['book']['cover']['file'] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
epubber-0.2.0 | lib/epubber/generators/cover.rb |