Class: Sass::Tree::VariableNode

Inherits:
Node
  • Object
show all
Defined in:
lib/sass/tree/variable_node.rb

Overview

A dynamic node representing a variable definition.

See Also:

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #filename, #has_children, #line, #options, #source_range

Instance Method Summary collapse

Methods inherited from Node

#<<, #==, #balance, #bubbles?, #css, #css_with_sourcemap, #deep_copy, #each, #inspect, #invisible?, #style, #to_sass, #to_scss

Constructor Details

#initialize(name, expr, guarded, global) ⇒ VariableNode


27
28
29
30
31
32
33
# File '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

#exprScript::Tree::Node

The parse tree for the variable value.


13
14
15
# File 'lib/sass/tree/variable_node.rb', line 13

def expr
  @expr
end

#globalBoolean (readonly)

Whether this is a global variable assignment (!global).


21
22
23
# File 'lib/sass/tree/variable_node.rb', line 21

def global
  @global
end

#guardedBoolean (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

#nameString (readonly)

The name of the variable.


9
10
11
# File 'lib/sass/tree/variable_node.rb', line 9

def name
  @name
end