This are my suggestions.

The states as a Hash are the best approach I have so far to simulate an enum (quick search on SO shows people using modules for that same but it's harder to check if a value is within the range)

I haven't tested it so beware of the bugs (: (I'll do that later)