Class: Malt::Engines::RTALS

Inherits:
Abstract show all
Defined in:
lib/malt/engines/rtals.rb

Overview

RTALS

http://github.com/rubyworks/rtals

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



30
31
32
33
# File 'lib/malt/engines/rtals.rb', line 30

def intermediate(params)
  text = params[:text]
  ::RTAL.new(text)
end

#render(params, &yld) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/malt/engines/rtals.rb', line 14

def render(params, &yld)
  text   = params[:text]
  file   = params[:file]
  data   = params[:data]
  format = params[:format]

  case format
  when :html, :xml, nil
    data = make_binding(data, &yld)
    intermediate(params).compile(data).to_s
  else
    super(params, &yld)
  end
end