Class: ExceptionallyBeautiful::MarkdownRenderer
- Inherits:
-
Object
- Object
- ExceptionallyBeautiful::MarkdownRenderer
- Defined in:
- lib/exceptionally_beautiful/markdown_renderer.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text) ⇒ MarkdownRenderer
constructor
A new instance of MarkdownRenderer.
- #render ⇒ Object
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
#text ⇒ Object (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
#render ⇒ Object
12 13 14 |
# File 'lib/exceptionally_beautiful/markdown_renderer.rb', line 12 def render markdown.render(text).html_safe end |