Class: Jackb::Markdown
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#formatted_content ⇒ Object
readonly
Returns the value of attribute formatted_content.
Instance Method Summary collapse
-
#initialize(content) ⇒ Markdown
constructor
A new instance of Markdown.
- #render ⇒ Object
Methods inherited from Highlight
Constructor Details
#initialize(content) ⇒ Markdown
Returns a new instance of Markdown.
7 8 9 10 |
# File 'lib/jackb/markdown.rb', line 7 def initialize(content) @content = content @formatted_content = RDiscount.new(content) end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
5 6 7 |
# File 'lib/jackb/markdown.rb', line 5 def content @content end |
#formatted_content ⇒ Object (readonly)
Returns the value of attribute formatted_content.
5 6 7 |
# File 'lib/jackb/markdown.rb', line 5 def formatted_content @formatted_content end |
Instance Method Details
#render ⇒ Object
13 14 15 |
# File 'lib/jackb/markdown.rb', line 13 def render super(formatted_content.to_html) end |