Code sample: elevator in ruby