class Sprockets::SassTemplate


For more infomation see:
Template engine class for the SASS/SCSS compiler. Depends on the ‘sass` gem.

def self.call(*args)

def self.call(*args)
  new.call(*args)
end

def self.syntax

may override it.
Internal: Defines default sass syntax to use. Exposed so the ScssTemplate
def self.syntax
  :sass
end

def call(input)

def call(input)
  context = input[:environment].context_class.new(input)
  options = {
    filename: input[:filename],
    syntax: self.class.syntax,
    cache_store: CacheStore.new(input[:cache], @cache_version),
    load_paths: input[:environment].paths,
    sprockets: {
      context: context,
      environment: input[:environment],
      dependencies: context.metadata[:dependency_paths]
    }
  }
  engine = ::Sass::Engine.new(input[:data], options)
  css = Utils.module_include(::Sass::Script::Functions, @functions) do
    engine.render
  end
  # Track all imported files
  engine.dependencies.map do |dependency|
    context.metadata[:dependency_paths] << dependency.options[:filename]
  end
  context.metadata.merge(data: css)
end

def initialize(options = {}, &block)


change after code changes are made to Sass Functions.
cache_version - String custom cache version. Used to force a cache
options - Hash

Public: Initialize template with custom options.
def initialize(options = {}, &block)
  @cache_version = options[:cache_version]
  @functions = Module.new do
    include Functions
    include options[:functions] if options[:functions]
    class_eval(&block) if block_given?
  end
end