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