soveran/micromachine — pull request #8 by senny (2012-06-12 14:14:05+00:00)
Title: the states method returns all defined states

a project of mine needs to inspect the state-machine for all defined states. It would be handy to have a `#states` method similar to the `#events` method, which returns an array of all the defined states.

The implementation is kinda ugly feel free to replace it with a more performant/readable one.

I've also added a test for the #events method, which was missing.