Archives for the Date March 12th, 2008

Programming Ruby: Chapter 7

if can be used to build expressions, so you can use it for conditional assignments.
variable =
  if condition
    if_value
  else
    else_value
Even using operators is basically calling methods. So 3 * 2 + 1 can be [...]