Module: Metadown
- Defined in:
- lib/metadown.rb,
lib/metadown/version.rb,
lib/metadown/renderer.rb
Overview
This module namespaces everything in the gem. It’s also where the factory #render method lives.
Defined Under Namespace
Constant Summary collapse
- VERSION =
The current released version of Metadown
"1.0.0"
Class Method Summary collapse
-
.render(text) ⇒ Object
The render method is a convenient factory.
Class Method Details
.render(text) ⇒ Object
The render method is a convenient factory. It parses some text via our Renderer class and Redcarpet’s own class, and gives us a Data back.
16 17 18 19 20 21 |
# File 'lib/metadown.rb', line 16 def render(text) renderer = Metadown::Renderer.new markdown = Redcarpet::Markdown.new(renderer) output = markdown.render(text) Data.new(renderer., output) end |