Class: ExceptionallyBeautiful::MarkdownRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/exceptionally_beautiful/markdown_renderer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ MarkdownRenderer

Returns a new instance of MarkdownRenderer.



8
9
10
# File 'lib/exceptionally_beautiful/markdown_renderer.rb', line 8

def initialize(text)
  @text = text
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



6
7
8
# File 'lib/exceptionally_beautiful/markdown_renderer.rb', line 6

def text
  @text
end

Instance Method Details

#renderObject



12
13
14
# File 'lib/exceptionally_beautiful/markdown_renderer.rb', line 12

def render
  markdown.render(text).html_safe
end