Class: RedQuilt::Renderer::HTML

Inherits:
Object
  • Object
show all
Defined in:
lib/red_quilt/renderer/html.rb

Instance Method Summary collapse

Constructor Details

#initialize(document, heading_ids: false) ⇒ HTML

Returns a new instance of HTML.



6
7
8
9
10
11
# File 'lib/red_quilt/renderer/html.rb', line 6

def initialize(document, heading_ids: false)
  @document = document
  @arena = document.arena
  @out = +""
  @slugger = Slug::Counter.new if heading_ids
end

Instance Method Details

#renderObject



13
14
15
16
# File 'lib/red_quilt/renderer/html.rb', line 13

def render
  render_children(@document.root_id)
  @out
end