From: Simon Vandemoortele Date: 2003-05-17T00:19:12+09:00 Subject: Re: State Pattern Implementation On Fri, 16 May 2003 at 02:59 GMT, Sacha Schlegel wrote: > Did look at the state pattern in "Desing Patterns, E. Gamma, R. Helm, R. > Johnson, J. Vlissides, Addison-Weslay, 1995 > Do YOU or anyone else have links to "implemented" ruby state pattern > code? Take a look at http://www.rubygarden.org/ruby?StatePattern Don't forget to look at the 'delegate' module which is documented in 'Programming Ruby' (http://www.rubycentral.com/book/lib_patterns.html). > Did look at your solution. I think I would like to seperate the > different states with their own classes as they might get a little bit > bigger. Good, that's the conventional approach to the state pattern. Simon -- If you want to travel around the world and be invited to speak at a lot of different places, just write a Unix operating system. -- Linus Torvalds