Class: Malt::Engines::RedCloth

Inherits:
Abstract
  • Object
show all
Defined in:
lib/malt/engines/redcloth.rb

Instance Attribute Summary

Attributes inherited from Abstract

#settings

Instance Method Summary collapse

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



26
27
28
29
# File 'lib/malt/engines/redcloth.rb', line 26

def intermediate(params={})
  text = params[:text]
  ::RedCloth.new(text)
end

#render(params = {}) ⇒ Object

Convert textile text to html.

params:

:format => Symbol of the format to render [:html]


16
17
18
19
20
21
22
23
# File 'lib/malt/engines/redcloth.rb', line 16

def render(params={})
  case params[:format]
  when :html, nil
    intermediate(params).to_html
  else
    super(params)
  end
end