From: "Hal E. Fulton" Date: 2003-07-18T02:39:10+09:00 Subject: Re: What's the point? ----- Original Message ----- From: "Nathaniel Talbott" To: "ruby-talk ML" Sent: Thursday, July 17, 2003 12:30 PM Subject: Re: What's the point? > Jim Freeze [mailto:jim@freeze.org] wrote: > > > Hmm, I think 'x' has the same visibility as 'fred'. > True, but it doesn't exist until fred is called: > This means you could do something, er, interesting, like this: > Why would you want to do that? I'm not exactly sure... [snippage] Here's an idea. class CrossPlatform def unix def meth1 #... def meth2 #... def meth3 #... end def windows def meth1 #... def meth2 #... def meth3 #... end end obj = CrossPlatform.new case this_os when "Windows" obj.windows when "Unix" obj.unix end Just a random thought. Hal -- Hal Fulton hal9000@hypermetrics.com