The Statemachine library is a simple yet full-featured Finite Statemachine framework. Define your statemachine in Ruby code and execute it in your system.
To download the package or source code visit the Statemachine project page. For the Statemachine gem:
> sudo gem install statemachine
or just
> gem install statemachine