Class: Sendmark::Markdown
- Inherits:
-
Object
- Object
- Sendmark::Markdown
- Defined in:
- lib/sendmark/markdown.rb
Instance Method Summary collapse
-
#initialize(css_parser) ⇒ Markdown
constructor
A new instance of Markdown.
- #render(text) ⇒ Object
Constructor Details
#initialize(css_parser) ⇒ Markdown
Returns a new instance of Markdown.
3 4 5 6 |
# File 'lib/sendmark/markdown.rb', line 3 def initialize(css_parser) render = Sendmark::Render.new(css_parser: css_parser) @markdown = Redcarpet::Markdown.new(render) end |
Instance Method Details
#render(text) ⇒ Object
8 9 10 |
# File 'lib/sendmark/markdown.rb', line 8 def render(text) @markdown.render(text) end |