Class: Sidewalk::TemplateHandlers::HamlHandler

Inherits:
Base
  • Object
show all
Defined in:
lib/sidewalk/template_handlers/haml_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ HamlHandler

Returns a new instance of HamlHandler.



9
10
11
12
# File 'lib/sidewalk/template_handlers/haml_handler.rb', line 9

def initialize path
  super path
  @engine = Haml::Engine.new(File.read(path))
end

Instance Method Details

#render(controller) ⇒ Object



14
15
16
# File 'lib/sidewalk/template_handlers/haml_handler.rb', line 14

def render controller
  @engine.render(BaseDelegate.new(controller))
end