The comment leading into the code using if...then is that Ruby does not have a ternary operator. This is not true - Ruby has the ternary operator (although the syntax requires spaces around the characters to disambiguate some cases).
Code:
puts (if 23.odd? then "23 odd" else "23 even" end)
puts( 23.odd? ? "23 odd" : "23 even" )