From: Andrew Nutter-Upham Date: 2007-08-16T01:15:29+09:00 Subject: Re: Singleton or full static class ------=_Part_89113_21598158.1187194533271 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Frank: While I can't speak for the whole community. I think that the singleton pattern is preferable over using all class methods because it is easier to refactor. If later your system needs more than one of these objects your job will be much simpler if it has been a singleton instance the whole time. -- Andy On 8/15/07, Frank Meyer wrote: > > In other languages I'm using the singleton pattern when I need a > globally accessible object. But in Ruby so much is an object or behaces > like an object (or can be treated as an object) I'm not sure if I should > use the singleton pattern or make all methods to class methods and use > class variables. > What is the best practise in ruby? > > > > > > Turing. > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_89113_21598158.1187194533271--