Class: Sass::Tree::VariableNode

Inherits:
Node
  • Object
show all
Defined in:
/Users/ceppstei/Projects/sass-lang/.sass/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

- (VariableNode) initialize(name, expr, guarded, global)

Returns a new instance of VariableNode

Parameters:



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.

Returns:



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).

Returns:

  • (Boolean)


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).

Returns:

  • (Boolean)


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.

Returns:

  • (String)


9
10
11
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/variable_node.rb', line 9

def name
  @name
end