Class: Sidewalk::TemplateHandlers::HamlHandler
- Defined in:
- lib/sidewalk/template_handlers/haml_handler.rb
Instance Method Summary collapse
-
#initialize(path) ⇒ HamlHandler
constructor
A new instance of HamlHandler.
- #render(controller) ⇒ Object
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 |