Interview Cake questions answered in Ruby