Class: Hamlit::Filters::Tilt

Inherits:
Base
  • Object
show all
Includes:
Concerns::StringInterpolation
Defined in:
lib/hamlit/filters/tilt.rb

Direct Known Subclasses

Coffee, Erb, Less, Markdown, Sass, Scss

Instance Attribute Summary

Attributes inherited from Base

#options

Class Method Summary collapse

Methods included from Concerns::StringInterpolation

#contains_interpolation?, #string_literal

Methods inherited from Base

#compile, #compile_lines, indent_source, #initialize

Constructor Details

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

Class Method Details

.render(name, source, indent_width: 2) ⇒ Object



10
11
12
13
# File 'lib/hamlit/filters/tilt.rb', line 10

def self.render(name, source, indent_width: 2)
  result = ::Tilt["t.#{name}"].new { source }.render
  indent_source(result, indent_width: indent_width)
end