Class: Tilt::SassTemplate
Overview
Sass template implementation. See: haml.hamptoncatlin.com/
Sass templates do not support object scopes, locals, or yield.
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
312 313 314 |
# File 'lib/sinatra/tilt.rb', line 312 def compile! @engine = ::Sass::Engine.new(data, ) end |
#evaluate(scope, locals, &block) ⇒ Object
316 317 318 |
# File 'lib/sinatra/tilt.rb', line 316 def evaluate(scope, locals, &block) @engine.render end |
#initialize_engine ⇒ Object
308 309 310 |
# File 'lib/sinatra/tilt.rb', line 308 def initialize_engine require_template_library 'sass' unless defined? ::Sass::Engine end |