class Middleman::Renderers::Sass::SassPlusCSSFilenameTemplate

A SassTemplate for Tilt which outputs debug messages

def evaluate(context, locals, &block)

Returns:
  • (String) -

Parameters:
  • locals (Hash) --
  • context (Class) --
def evaluate(context, locals, &block)
  @context ||= context
  @engine = ::Sass::Engine.new(data, sass_options)
  begin
    @engine.render
  rescue ::Sass::SyntaxError => e
    ::Sass::SyntaxError.exception_to_css(e, :full_exception => true)
  end
end

def initialize(*args, &block)

def initialize(*args, &block)
  super
  
  if @options.has_key?(:context)
    @context = @options[:context]
  end
end

def prepare; end

def prepare; end

def sass_options

Returns:
  • (Hash) -
def sass_options
  more_opts = { :filename => eval_file, :line => line, :syntax => syntax }
  
  if @context.is_a?(::Middleman::Application) && file
    location_of_sass_file = @context.source_dir
  
    parts = basename.split('.')
    parts.pop
    more_opts[:css_filename] = File.join(location_of_sass_file, @context.config[:css_dir], parts.join("."))
  end
  
  options.merge(more_opts)
end

def syntax

Returns:
  • (Symbol) -
def syntax
  :sass
end