class Less::Parser::Tree

Abstract LessCSS syntax tree Less. Mainly used to emit CSS

Public Class Methods

new(tree) click to toggle source

Create a tree from a native javascript object. @param [V8::Object] tree the native less.js tree

# File lib/less/parser.rb, line 52
def initialize(tree)
  @tree = tree
end

Public Instance Methods

to_css(options = {}) click to toggle source

Serialize this tree into CSS. By default this will be in pretty-printed form. @param [Hash] opts modifications to the output @option opts [Boolean] :compress minify output instead of pretty-printing

# File lib/less/parser.rb, line 60
def to_css(options = {})
  Less::JavaScript.exec { @tree.toCSS(options) }
end