Class: Faml::FilterCompilers::Css

Inherits:
Base
  • Object
show all
Defined in:
lib/faml/filter_compilers/css.rb

Instance Method Summary collapse

Methods inherited from Base

#need_newline?

Instance Method Details

#compile(ast) ⇒ Object



7
8
9
10
11
12
# File 'lib/faml/filter_compilers/css.rb', line 7

def compile(ast)
  temple = [:multi, [:static, "\n"], [:newline]]
  compile_texts(temple, ast.lineno, ast.texts, tab_width: 2)
  temple << [:static, "\n"]
  [:haml, :tag, 'style', false, [:html, :attrs], temple]
end