Class: Jackb::Markdown

Inherits:
Highlight show all
Defined in:
lib/jackb/markdown.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Highlight

render

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

#contentObject (readonly)

Returns the value of attribute content.



5
6
7
# File 'lib/jackb/markdown.rb', line 5

def content
  @content
end

#formatted_contentObject (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

#renderObject



13
14
15
# File 'lib/jackb/markdown.rb', line 13

def render
  super(formatted_content.to_html)
end