From: Ross Bamford Date: 2006-01-05T07:18:10+09:00 Subject: Re: Repost: singleton methods vs. class instance vars Ahem, sorry. On Wed, 04 Jan 2006 22:09:09 -0000, I forgot to write: > > Seems to me the technique is about one-time creation of attribute > accessors that, instead of looking like: > def name @name end look like this: > def name > "name" > end > > Which, when called multiple times, may be faster than equivalent > instance variable lookups. My *guess* is that this is probably a bit > quicker with symbols and maybe strings (which is what this seems to be > using - notice the 'inspect' too) than going for an instance var. > > ? > -- Ross Bamford - rosco@roscopeco.remove.co.uk