Class: Tilt::SassTemplate

Inherits:
Template show all
Defined in:
lib/tilt/sass.rb

Overview

Sass template implementation. See: haml.hamptoncatlin.com/

Sass templates do not support object scopes, locals, or yield.

Direct Known Subclasses

ScssTemplate

Instance Attribute Summary

Attributes inherited from Template

#data, #file, #line, #options

Instance Method Summary collapse

Methods inherited from Template

#basename, default_mime_type, default_mime_type=, #eval_file, #initialize, metadata, #metadata, #name, #render

Constructor Details

This class inherits a constructor from Tilt::Template

Instance Method Details

#allows_script?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/tilt/sass.rb', line 31

def allows_script?
  false
end

#evaluate(scope, locals, &block) ⇒ Object



27
28
29
# File 'lib/tilt/sass.rb', line 27

def evaluate(scope, locals, &block)
  @output ||= @engine.render
end

#prepareObject



23
24
25
# File 'lib/tilt/sass.rb', line 23

def prepare
  @engine = Sass::Engine.new(data, sass_options)
end