You can use post conditions (don’t mind the name, it will be evaluated before the code. And do_something will only be executed if condition evaluates to truthy value (i.e. not nil or false)).
do_something if a
You can use post conditions (don’t mind the name, it will be evaluated before the code. And do_something will only be executed if condition evaluates to truthy value (i.e. not nil or false)).
do_something if a