Class: Tufte::Markdown

Inherits:
Object
  • Object
show all
Defined in:
lib/tufte/markdown.rb

Instance Method Summary collapse

Constructor Details

#initialize(markdown, renderer: HTML.renderer) ⇒ Markdown

Returns a new instance of Markdown.



15
16
17
18
# File 'lib/tufte/markdown.rb', line 15

def initialize(markdown, renderer: HTML.renderer)
  @markdown = markdown
  @renderer = renderer
end

Instance Method Details

#to_htmlObject



20
21
22
# File 'lib/tufte/markdown.rb', line 20

def to_html
  @renderer.render(@markdown)
end