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