Class Node::IF
In: ext/nodeinfo.c
Parent: Node

Represents a conditional of the form:

  if cond then
    body
  end

or the form:

  if cond then
    body
  else
    else
  end

The condition is first evaluated. If it is true, then body is evaluated, otherwise else is evaluated. The result is the value of the expression evaluated, or nil if there was no expression present.

A conditional block using elsif has another IF node as the else expression.

Methods

body   cond   else   members  

Public Class methods

Return an array of strings containing the names of the node class‘s members.

Public Instance methods

the body of the loop

a condition to terminate the loop when it becomes true

the expression to be evaluated if no exception is raised

[Validate]