Class: MinimalMarkdown::HtmlRenderer
- Inherits:
-
Object
- Object
- MinimalMarkdown::HtmlRenderer
- Defined in:
- lib/minimal_markdown/html_renderer.rb
Instance Attribute Summary collapse
-
#tree ⇒ Object
readonly
Returns the value of attribute tree.
Instance Method Summary collapse
-
#initialize(tree) ⇒ HtmlRenderer
constructor
A new instance of HtmlRenderer.
- #render ⇒ Object
Constructor Details
#initialize(tree) ⇒ HtmlRenderer
Returns a new instance of HtmlRenderer.
5 6 7 |
# File 'lib/minimal_markdown/html_renderer.rb', line 5 def initialize(tree) @tree = tree end |
Instance Attribute Details
#tree ⇒ Object (readonly)
Returns the value of attribute tree.
3 4 5 |
# File 'lib/minimal_markdown/html_renderer.rb', line 3 def tree @tree end |
Instance Method Details
#render ⇒ Object
9 10 11 12 13 |
# File 'lib/minimal_markdown/html_renderer.rb', line 9 def render output = '' tree.each { |node| node.render(output) } output end |