elevator simulator in Ruby