Class: Hamlit::Filters::Sass

Inherits:
TiltBase show all
Defined in:
lib/hamlit/filters/sass.rb

Instance Method Summary collapse

Methods inherited from TiltBase

#explicit_require?, render

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Hamlit::Filters::Base

Instance Method Details

#compile(node) ⇒ Object


5
6
7
8
9
10
11
12
# File 'lib/hamlit/filters/sass.rb', line 5

def compile(node)
  require 'tilt/sass' if explicit_require?('sass')
  temple = [:multi]
  temple << [:static, "<style>\n"]
  temple << compile_with_tilt(node, 'sass', indent_width: 2)
  temple << [:static, "</style>"]
  temple
end