class Epubber::Generators::Generator
Attributes
book[R]
persistance[R]
Public Class Methods
new(book:, persistance:)
click to toggle source
# File lib/epubber/generators/generator.rb, line 6 def initialize(book:, persistance:) @book = book @persistance = persistance end
Protected Instance Methods
book_context()
click to toggle source
# File lib/epubber/generators/generator.rb, line 13 def book_context @book_context ||= { 'book' => book.contextify } end
persist(file:, content:)
click to toggle source
# File lib/epubber/generators/generator.rb, line 25 def persist(file:, content:) persistance.persist file: file, content: content end
template()
click to toggle source
# File lib/epubber/generators/generator.rb, line 17 def template Epubber::Services::Template.new end
template_path(file)
click to toggle source
# File lib/epubber/generators/generator.rb, line 21 def template_path(file) template.path file end