The Ruby language has a very simple control structure that is easy to read and follow.

The following sample will print “The variable is 10” if var is equal to 10.

Otherwise it will print “The variable is Not 10”.

print “The variable is " + (var == 10 ?

“10” : “Not 10”)