class Sass::Tree::IfNode

@see Sass::Tree
each {IfNode} has a link ({#else}) to the next {IfNode}.
This is done as a linked list:
{IfNode}s are a little odd, in that they also represent ‘@else` and `@else if`s.
A dynamic node representing a Sass `@if` statement.

def _perform(environment)

Other tags:
    See: Sass::Tree -

Returns:
  • (Array) - The resulting static nodes

Parameters:
  • environment (Sass::Environment) -- The lexical environment containing
def _perform(environment)
  environment = Sass::Environment.new(environment)
  return perform_children(environment) if @expr.nil? || @expr.perform(environment).to_bool
  return @else.perform(environment) if @else
  []
end

def add_else(node)

Parameters:
  • node (IfNode) -- The `@else` node to append
def add_else(node)
  @last_else.else = node
  @last_else = node
end

def initialize(expr)

Parameters:
  • expr (Script::Expr) -- The conditional expression.
def initialize(expr)
  @expr = expr
  @last_else = self
  super()
end

def options=(options)

def options=(options)
  super
  self.else.options = options if self.else
end