Class: Bookit::Emitter::Epub
- Defined in:
- lib/bookit/emitter/epub.rb
Constant Summary
Constants inherited from Abstract
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
Methods inherited from Abstract
Constructor Details
This class inherits a constructor from Bookit::Emitter::Abstract
Instance Method Details
#generate ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/bookit/emitter/epub.rb', line 6 def generate tfile = Tempfile.new(["temp", ".html"]) tfile.write %{ <!DOCTYPE html> <html> <body> <h1>#{@article.title}</h1> <b>#{@article.}</b> <br/> <i> #{@article.date_published} <br/> #{@article.url} </i> <br/> #{@article.content.raw_content} </body> </html> } tfile.close data = @article epub = EeePub.make do title data.title date data.date_published creator data. identifier data.url, scheme: "URL" uid data.url files [File.(tfile.path)] end epub end |