class Epubber::Generators::Static

Public Instance Methods

generate() click to toggle source
# File lib/epubber/generators/static.rb, line 5
def generate
  files = ['mimetype', 'META-INF/container.xml', 'META-INF/com.apple.ibooks.display-options.xml',
           'OEBPS/Styles/style.css']
  files.each do |file|
    copy file
  end
end

Protected Instance Methods

copy(file) click to toggle source

Get the file from the template and copy it unchanged

# File lib/epubber/generators/static.rb, line 16
def copy(file)
  content = File.open(template_path(file)).read
  persist file: file, content: content
end