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.



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

def initialize(text)
  @text = text
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



3
4
5
# File 'lib/exceptionally_beautiful/markdown_renderer.rb', line 3

def text
  @text
end

Instance Method Details

#renderObject



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

def render
  markdown.render(text).html_safe
end