Class: Sprockets::Sass::SassTemplate

Inherits:
Object
  • Object
show all
Defined in:
lib/middleman3-sassc/monkey-patches.rb

Instance Method Summary collapse

Instance Method Details

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



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/middleman3-sassc/monkey-patches.rb', line 22

def evaluate(context, locals, &block)
  # empty file?
  if data.empty?
    @output = ''
  end

  @output ||= begin
    @context = context
    options = sass_options
    options = options.merge(::Middleman3::SassC::create_sassc_options(context.environment,
      context))
    ::SassC::Engine.new(data, options).render
  end
end