From: James Edward Gray II Date: 2006-08-09T05:35:44+09:00 Subject: Re: Global variables considered harmful? On Aug 8, 2006, at 2:50 PM, coachhilton@gmail.com wrote: > Sure, these are really > global variables packaged up in the base class but at least they are > encapsulate and the script doesn't know where they came from or how > they got there. You can also make the class a singleton so all code works with just one configuration object: >> require "singleton" => true >> class Config >> include Singleton >> end => Config >> p Config.instance.object_id 1651794 => nil >> # and later, in an unrelated piece of code... ?> p Config.instance.object_id 1651794 => nil James Edward Gray II