From: Brian Candler Date: 2010-12-16T00:08:16+09:00 Subject: Re: How do I define virtual global variable in ruby? In addition to what Robert said, maybe const_missing would be useful to you. >> module Foo >> def self.const_missing(name) >> Time.now >> end >> end => nil >> Foo::Bar => Wed Dec 15 15:07:26 +0000 2010 >> Foo::Bar => Wed Dec 15 15:07:28 +0000 2010 Constants scoped to modules are IMO less evil than globals. -- Posted via http://www.ruby-forum.com/.