# Class: Haml::Filters::Less

Inherits:
  TiltBase
  - Object
  - Base
  - TiltBase
  - Haml::Filters::Less
  show all

Defined in:
  lib/haml/filters/less.rb

## Instance Method Summary collapse

- #compile(node)

### Methods inherited from TiltBase

#explicit_require?, render

### Methods inherited from Base

#initialize

## Constructor Details

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

## Instance Method Details

### #compile(node)

    10
    11
    12
    13
    14
    15
    16
    17

    # File 'lib/haml/filters/less.rb', line 10

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