On this page
class · Ruby 4.0
Prism::UnlessNode
Represents the use of the unless keyword, either in the block form or the modifier form.
bar unless foo ^^^^^^^^^^^^^^ unless foo then bar end ^^^^^^^^^^^^^^^^^^^^^^^
Class methods 2
Instance methods 20
Attributes
Read
The else clause of the unless expression, if present.
unless cond then bar else baz end
^^^^^^^^
Read
The condition to be evaluated for the unless expression. It can be any non-void expression.
unless cond then bar end
^^^^
bar unless cond
^^^^
Read
The body of statements that will executed if the unless condition is falsey. Will be nil if no body is provided.
unless cond then bar end
^^^