Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (11 sloc) 277 Bytes
require 'haml'
class Template
def initialize(view)
@view = view
end
def render(locals={})
Haml::Engine.new(File.read("views/layout.html.haml")).render do
Haml::Engine.new(File.read("views/#{@view}.html.haml")).render(Object.new, locals)
end
end
end