Class: Typst::HtmlDocument
Instance Attribute Summary collapse
-
#title ⇒ Object
Returns the value of attribute title.
Attributes inherited from Document
Instance Method Summary collapse
-
#initialize(bytes, title) ⇒ HtmlDocument
constructor
A new instance of HtmlDocument.
- #markup ⇒ Object (also: #document)
Methods inherited from Document
Constructor Details
#initialize(bytes, title) ⇒ HtmlDocument
Returns a new instance of HtmlDocument.
13 14 15 16 |
# File 'lib/formats/html.rb', line 13 def initialize(bytes, title) super(bytes) self.title = title end |
Instance Attribute Details
#title ⇒ Object
Returns the value of attribute title.
11 12 13 |
# File 'lib/formats/html.rb', line 11 def title @title end |
Instance Method Details
#markup ⇒ Object Also known as: document
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/formats/html.rb', line 18 def markup %{ <!DOCTYPE html> <html> <head> <title>#{title}</title> </head> <body> #{pages.join("<br />")} </body> </html> } end |