From 8cf36ffb64f339f9aa9ef392f3c1f7a5ce0acad7 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Sun, 10 Jul 2011 13:36:08 -0700 Subject: [PATCH] simplify haml renderer --- lib/middleman/renderers/haml.rb | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/lib/middleman/renderers/haml.rb b/lib/middleman/renderers/haml.rb index ac7ab3ee..a6c10e32 100755 --- a/lib/middleman/renderers/haml.rb +++ b/lib/middleman/renderers/haml.rb @@ -1,21 +1,20 @@ -require "haml" -require "coffee-filter" +module Middleman::Renderers::Haml + class << self + def registered(app) + # Base library + require "haml" -module Middleman - module Renderers - module Haml - class << self - def registered(app) - app.helpers Helpers - end - alias :included :registered - end + # Coffee-script filter for Haml + require "coffee-filter" - module Helpers - def haml_partial(name, options = {}) - render(name, options) - end - end + app.helpers Helpers + end + alias :included :registered + end + + module Helpers + def haml_partial(name, options = {}) + render(name, options) end end end \ No newline at end of file