Class: Tilt::SassTemplate

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

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

#data, #file, #line, #options

Instance Method Summary collapse

Methods inherited from Template

#basename, #eval_file, #initialize, #name, #render

Constructor Details

This class inherits a constructor from Tilt::Template

Instance Method Details

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



519
520
521
# File 'lib/frank/tilt.rb', line 519

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

#initialize_engineObject



510
511
512
513
# File 'lib/frank/tilt.rb', line 510

def initialize_engine
  return if defined? ::Sass::Engine
  require_template_library 'sass'
end

#prepareObject



515
516
517
# File 'lib/frank/tilt.rb', line 515

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