Module: Template

Included in:
Rambo::Controller
Defined in:
lib/rambo/controller/template.rb

Constant Summary collapse

@@template_cache =
{}

Instance Method Summary collapse

Instance Method Details

#erb(template, options = {}, locals = {}) ⇒ Object



5
6
7
8
# File 'lib/rambo/controller/template.rb', line 5

def erb(template, options={}, locals={})
  require 'erb' unless defined? ::ERB
  render :erb, template, options, locals
end

#haml(template, options = {}, locals = {}) ⇒ Object



10
11
12
13
# File 'lib/rambo/controller/template.rb', line 10

def haml(template, options={}, locals={})
  require 'haml' unless defined? ::Haml
  render :haml, template, options, locals
end