Class: Sass::Tree::RootNode
- Inherits:
- Node
- Object
- Node
- Sass::Tree::RootNode
- Defined in:
- /Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/root_node.rb
Overview
A static node that is the root node of the Sass document.
Direct Known Subclasses
Instance Attribute Summary (collapse)
- - template readonly
The Sass template from which this node was created.
Attributes inherited from Node
#children, #filename, #has_children, #line, #options, #source_range
Instance Method Summary (collapse)
- - (RootNode) initialize(template) constructor
A new instance of RootNode.
- - (String) render
Runs the dynamic Sass code and computes the CSS for the tree.
- - ((String, Sass::Source::Map)) render_with_sourcemap
Runs the dynamic Sass code and computes the CSS for the tree, along with the sourcemap.
Methods inherited from Node
#<<, #==, #balance, #bubbles?, #css, #css_with_sourcemap, #deep_copy, #each, #inspect, #invisible?, #style, #to_sass, #to_scss
Constructor Details
- (RootNode) initialize(template)
Returns a new instance of RootNode
11 12 13 14 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/root_node.rb', line 11
def initialize(template)
super()
@template = template
end |
Instance Attribute Details
- template (readonly)
The Sass template from which this node was created
8 9 10 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/root_node.rb', line 8
def template
@template
end |
Instance Method Details
- (String) render
Runs the dynamic Sass code and computes the CSS for the tree.
19 20 21 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/root_node.rb', line 19
def render
css_tree.css
end |
- ((String, Sass::Source::Map)) render_with_sourcemap
Runs the dynamic Sass code and computes the CSS for the tree, along with the sourcemap.
28 29 30 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/root_node.rb', line 28
def render_with_sourcemap
css_tree.css_with_sourcemap
end |