Class: Malt::Engines::BlueCloth
- Defined in:
- lib/malt/engines/bluecloth.rb
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
-
#intermediate(params) ⇒ Object
Convert Markdown text to intermediate object.
-
#render(params) ⇒ Object
Convert Markdown text to HTML text.
Methods inherited from Abstract
#cache?, #compile, default, #initialize, register
Constructor Details
This class inherits a constructor from Malt::Engines::Abstract
Instance Method Details
#intermediate(params) ⇒ Object
Convert Markdown text to intermediate object.
23 24 25 26 |
# File 'lib/malt/engines/bluecloth.rb', line 23 def intermediate(params) text = params[:text] ::BlueCloth.new(text) end |
#render(params) ⇒ Object
Convert Markdown text to HTML text.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/malt/engines/bluecloth.rb', line 11 def render(params) text = params[:text] format = params[:format] case format when :html, nil intermediate(params).to_html else super(params) end end |