Class: Sass::Tree::Visitors::Convert

Inherits:
Base
  • Object
show all
Defined in:
.ruby-sass/lib/sass/tree/visitors/convert.rb

Overview

A visitor for converting a Sass tree into a source string.

Class Method Summary (collapse)

Class Method Details

.visit(root, options, format) ⇒ String

Runs the visitor on a tree.

Parameters:

  • root (Tree::Node)

    The root node of the Sass tree.

  • options ({Symbol => Object})

    An options hash (see CSS#initialize).

  • format (Symbol)

    `:sass` or `:scss`.

Returns:

  • (String)

    The Sass or SCSS source for the tree.



9
10
11
# File '.ruby-sass/lib/sass/tree/visitors/convert.rb', line 9

def self.visit(root, options, format)
  new(options, format).send(:visit, root)
end