Class: Sass::Tree::VariableNode
- Inherits:
-
Node
- Object
- Node
- Sass::Tree::VariableNode
- Defined in:
- .ruby-sass/lib/sass/tree/variable_node.rb
Overview
A dynamic node representing a variable definition.
Instance Attribute Summary (collapse)
-
#expr ⇒ Script::Tree::Node
The parse tree for the variable value.
-
#global ⇒ Boolean
readonly
Whether this is a global variable assignment (`!global`).
-
#guarded ⇒ Boolean
readonly
Whether this is a guarded variable assignment (`!default`).
-
#name ⇒ String
readonly
The name of the variable.
Attributes inherited from Node
#children, #filename, #has_children, #line, #options, #source_range
Instance Method Summary (collapse)
-
#initialize(name, expr, guarded, global) ⇒ VariableNode
constructor
A new instance of VariableNode.
Methods inherited from Node
#<<, #==, #bubbles?, #css, #css_with_sourcemap, #deep_copy, #each, inherited, #inspect, #invisible?, #style, #to_sass, #to_scss
Constructor Details
#initialize(name, expr, guarded, global) ⇒ VariableNode
Returns a new instance of VariableNode
27 28 29 30 31 32 33 |
# File '.ruby-sass/lib/sass/tree/variable_node.rb', line 27 def initialize(name, expr, guarded, global) @name = name @expr = expr @guarded = guarded @global = global super() end |
Constructor Details
#initialize(name, expr, guarded, global) ⇒ VariableNode
Returns a new instance of VariableNode
27 28 29 30 31 32 33 |
# File '.ruby-sass/lib/sass/tree/variable_node.rb', line 27 def initialize(name, expr, guarded, global) @name = name @expr = expr @guarded = guarded @global = global super() end |
Instance Attribute Details
#expr ⇒ Script::Tree::Node
The parse tree for the variable value.
13 14 15 |
# File '.ruby-sass/lib/sass/tree/variable_node.rb', line 13 def expr @expr end |
#global ⇒ Boolean (readonly)
Whether this is a global variable assignment (`!global`).
21 22 23 |
# File '.ruby-sass/lib/sass/tree/variable_node.rb', line 21 def global @global end |
#guarded ⇒ Boolean (readonly)
Whether this is a guarded variable assignment (`!default`).
17 18 19 |
# File '.ruby-sass/lib/sass/tree/variable_node.rb', line 17 def guarded @guarded end |
#name ⇒ String (readonly)
The name of the variable.
9 10 11 |
# File '.ruby-sass/lib/sass/tree/variable_node.rb', line 9 def name @name end |