Module: CommonMob::Template

Includes:
Erb, Mustache
Defined in:
lib/common_mob/template.rb

Instance Method Summary collapse

Methods included from Erb

#render_erb

Methods included from Mustache

#render_mustache

Instance Method Details

#render_template(src, variables) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/common_mob/template.rb', line 15

def render_template(src,variables)
  if src.to_s[/\.mustache$/]
    render_mustache(src,variables)
  else
    render_erb(src,variables)
  end
end