Hi ..

Jim Weirich <jim / weirichhouse.org> wrote:
> On Wednesday 03 November 2004 11:34 am, Eivind Eklund wrote:
>> Wouldn't this be better implemented as meta-programming in Ruby, 
> 
> Funny you should mention this ... I was playing with ruby state
> machines about two weeks ago (even using the turnstile example in my
> unit tests).  This is what I came up with ....
> 
Funny how this happens .. :-)  How do you access the state machine, Jim?  

I also came up with a similar scheme before I went to the generator 
approach.  One of the advantages that I saw to using a YAML file is that 
the schema is pretty clean (events, actions, state transitions) and you 
only have to implement the actions.  Then again, that is based on a server 
receiving client messages, which may be a different model to the one you 
are using.

Are you going to publish your StateMachine class?

Regards,
-mark.