Class: Docx::Document
- Inherits:
-
Object
- Object
- Docx::Document
- Defined in:
- lib/docx/html.rb
Instance Method Summary collapse
Instance Method Details
#to_html(options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/docx/html.rb', line 8 def to_html(={}) HtmlWriter.new.write do |html| html.doctype [:doctype] || 5 html.head do |head| head.title [:title] || '' end html.body do |body| self.each_paragraph do |paragraph| body.p paragraph.text_runs.map{ |tr| inline_content_for(tr) }.join('') end end end end |