Class: Asuka::Document
Instance Method Summary collapse
-
#initialize(lines, parser = Parser.new) ⇒ Document
constructor
A new instance of Document.
- #to_html ⇒ Object
Methods included from HTMLable
Constructor Details
#initialize(lines, parser = Parser.new) ⇒ Document
Returns a new instance of Document.
32 33 34 35 |
# File 'lib/asuka/document.rb', line 32 def initialize(lines, parser=Parser.new) super(lines) @parser = parser end |
Instance Method Details
#to_html ⇒ Object
37 38 39 |
# File 'lib/asuka/document.rb', line 37 def to_html children.map { |child| child.to_html }.join("\n") end |