34,333
edits
Changes
→The Ruby if Statement
The ''if'' statement is the most basic of the Ruby control structures. ''if'' statements simply specify a section of Ruby script to be executed when a specified criteria is met. The syntax for an ''if'' statement is as follows:
if ''expression'' then<br> ''ruby code''<br>
end