Class: Hamlit::Filters::Less

Inherits:
Tilt
  • Object
show all
Defined in:
lib/hamlit/filters/less.rb

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Tilt

render

Methods included from Concerns::StringInterpolation

#contains_interpolation?, #string_literal

Methods inherited from Base

#compile_lines, indent_source, #initialize

Constructor Details

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

Instance Method Details

#compile(lines) ⇒ Object



6
7
8
9
# File 'lib/hamlit/filters/less.rb', line 6

def compile(lines)
  ast = [:html, :tag, 'style', [:html, :attrs]]
  compile_with_tilt('less', lines.join("\n"), ast)
end