An implementation of the State Design Pattern in Ruby.