Class: Sass::Tree::VariableNode
- Inherits:
-
Node
- Object
- Node
- Sass::Tree::VariableNode
- Defined in:
- /var/www/sass-pages/.sass/lib/sass/tree/variable_node.rb
Overview
A dynamic node representing a variable definition.
Instance Attribute Summary
- - (Script::Node) expr The parse tree for the variable value.
-
- (Boolean) guarded
readonly
Whether this is a guarded variable assignment (
!default). - - (String) name readonly The name of the variable.
Instance Method Summary
- - (VariableNode) initialize(name, expr, guarded) constructor A new instance of VariableNode.
Methods inherited from Node
#<<, #==, #balance, #deep_copy, #do_extend, #each, #invisible?, #style, #to_s, #to_sass, #to_scss
Constructor Details
- (VariableNode) initialize(name, expr, guarded)
A new instance of VariableNode
22 23 24 25 26 27 |
# File '/var/www/sass-pages/.sass/lib/sass/tree/variable_node.rb', line 22
def initialize(name, expr, guarded)
@name = name
@expr = expr
@guarded = guarded
super()
end
|
Instance Attribute Details
- (Script::Node) expr
The parse tree for the variable value.
13 14 15 |
# File '/var/www/sass-pages/.sass/lib/sass/tree/variable_node.rb', line 13
def expr
@expr
end
|
- (Boolean) guarded (readonly)
Whether this is a guarded variable assignment (!default).
17 18 19 |
# File '/var/www/sass-pages/.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 '/var/www/sass-pages/.sass/lib/sass/tree/variable_node.rb', line 9
def name
@name
end
|