Class: Mustache

Inherits:
Object
  • Object
show all
Defined in:
lib/mhaml/mustache_override.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.partial(name, context) ⇒ Object



3
4
5
6
# File 'lib/mhaml/mustache_override.rb', line 3

def self.partial(name, context)
  file = File.read("#{template_path}/#{name}.#{template_extension}")
  Haml::Engine.new(file).render(Object.new, context)
end

Instance Method Details

#partial(name) ⇒ Object



8
9
10
# File 'lib/mhaml/mustache_override.rb', line 8

def partial(name)
  self.class.partial(name, @context)
end