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.
5 6 7 |
# File 'lib/exceptionally_beautiful/markdown_renderer.rb', line 5 def initialize(text) @text = text end |
Instance Attribute Details
#text ⇒ Object (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
#render ⇒ Object
9 10 11 |
# File 'lib/exceptionally_beautiful/markdown_renderer.rb', line 9 def render markdown.render(text).html_safe end |