Class: Malt::Engines::Tenjin
- Defined in:
- lib/malt/engines/tenjin.rb
Overview
Tenjin
http://www.kuwata-lab.com/tenjin/
options
:escapefunc=>'CGI.escapeHTML'
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
Methods inherited from Abstract
#cache?, default, #initialize, register
Constructor Details
This class inherits a constructor from Malt::Engines::Abstract
Instance Method Details
#compile(params) ⇒ Object
34 35 36 37 38 |
# File 'lib/malt/engines/tenjin.rb', line 34 def compile(params) text = params[:text] file = params[:file] intermediate(params).convert(text, file) end |
#render(params, &yld) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/malt/engines/tenjin.rb', line 17 def render(params, &yld) text = params[:text] file = params[:file] data = params[:data] type = params[:type] format = params[:format] || :html return super(params, &yld) if type == :rbhtml && format != :html data = make_hash(data, &yld) template = intermediate(params) template.convert(text, file) template.render(data) end |