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

Instance Method Summary collapse

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.

Parameters:



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

#exprScript::Node

The parse tree for the variable value.

Returns:



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

def expr
  @expr
end

#guardedBoolean (readonly)

Whether this is a guarded variable assignment (!default).

Returns:

  • (Boolean)


17
18
19
# File 'lib/sass/tree/variable_node.rb', line 17

def guarded
  @guarded
end

#nameString (readonly)

The name of the variable.

Returns:

  • (String)


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

def name
  @name
end