On this page
class · Ruby 4.0
Prism::IfNode
Represents the use of the if keyword, either in the block form or the modifier form, or a ternary expression.
bar if foo ^^^^^^^^^^ if foo then bar end ^^^^^^^^^^^^^^^^^^^ foo ? bar : baz ^^^^^^^^^^^^^^^
Class methods 2
Instance methods 20
Attributes
Read
The node for the condition the IfNode is testing.
if foo
^^^
bar
end
bar if foo
^^^
foo ? bar : baz
^^^
Read
Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be nil when no body is provided.
if foo bar ^^^ baz ^^^ end
Read