Class: Sass::Tree::VariableNode
- Defined in:
- lib/sass/tree/variable_node.rb
Overview
A dynamic node representing a variable definition.
Instance Attribute Summary collapse
-
#expr ⇒ Script::Node
The parse tree for the variable value.
-
#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
Instance Method Summary collapse
-
#initialize(name, expr, guarded) ⇒ VariableNode
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
#initialize(name, expr, guarded) ⇒ VariableNode
Returns a new instance of VariableNode.
22 23 24 25 26 27 |
# File 'lib/sass/tree/variable_node.rb', line 22
def initialize(name, expr, guarded)
@name = name
@expr = expr
@guarded = guarded
super()
end
|
Instance Attribute Details
#expr ⇒ Script::Node
The parse tree for the variable value.
13 14 15 |
# File 'lib/sass/tree/variable_node.rb', line 13
def expr
@expr
end
|
#guarded ⇒ Boolean (readonly)
Whether this is a guarded variable assignment (!default
).
17 18 19 |
# File 'lib/sass/tree/variable_node.rb', line 17
def guarded
@guarded
end
|
#name ⇒ String (readonly)
The name of the variable.
9 10 11 |
# File 'lib/sass/tree/variable_node.rb', line 9
def name
@name
end
|