The basic conditional if in ruby is like any other programming language.
if condition then
[statements to execute if condition is satisfied (true) ]
If only a statement needed to executed then we can use shorthand form of if. Statement is at front followed by if and condition.
Ruby also have unless for conditional branching. Difference is statement will be executed if condition not satisfied (false).
Try it yourself at irb ! Bye …