Class: Tilt::HamlTemplate
Overview
Haml template implementation. See: haml.hamptoncatlin.com/
Instance Attribute Summary
Attributes inherited from Template
Instance Method Summary collapse
Methods inherited from Template
#basename, #compile, #eval_file, #initialize, #name, #render
Constructor Details
This class inherits a constructor from Tilt::Template
Instance Method Details
#compile! ⇒ Object
287 288 289 |
# File 'lib/sinatra/tilt.rb', line 287 def compile! @engine = ::Haml::Engine.new(data, ) end |
#evaluate(scope, locals, &block) ⇒ Object
291 292 293 |
# File 'lib/sinatra/tilt.rb', line 291 def evaluate(scope, locals, &block) @engine.render(scope, locals, &block) end |
#initialize_engine ⇒ Object
283 284 285 |
# File 'lib/sinatra/tilt.rb', line 283 def initialize_engine require_template_library 'haml' unless defined? ::Haml::Engine end |