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