More Conditional Logic in Ruby!

Watch out! This tutorial is over 3 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.
Tutorial Difficulty Level    

Following from the previous tutorial on Conditional Logic in Ruby, look at this example:

Some more amazing if lore:

  1. The unless keyword is like if, but uses the opposite sense of the test: The code is run if the test is false.
  2. As with many things in Rubyif may look like a statement, but it is actually an expression, with a return value.
  3. The if has a postfix form where the condition comes last. This works with unless as well.