Class: Sass::Tree::IfNode

Inherits:
Node show all
Defined in:
lib/sass/tree/if_node.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #filename, #line

Instance Method Summary collapse

Methods inherited from Node

#<<, #==, #last, #perform, #to_s, #to_sass

Constructor Details

#initialize(expr, options) ⇒ IfNode

Returns a new instance of IfNode.



7
8
9
10
11
# File 'lib/sass/tree/if_node.rb', line 7

def initialize(expr, options)
  @expr = expr
  @last_else = self
  super(options)
end

Instance Attribute Details

#elseObject

Returns the value of attribute else.



5
6
7
# File 'lib/sass/tree/if_node.rb', line 5

def else
  @else
end

Instance Method Details

#add_else(node) ⇒ Object



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

def add_else(node)
  @last_else.else = node
  @last_else = node
end