Class: Hamlit::Filters::Tilt

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

Class Method Summary collapse

Methods included from Concerns::StringInterpolation

#contains_interpolation?, #string_literal

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