From: ahoward Date: 2003-01-14T08:12:44+09:00 Subject: Re: subclasses On Tue, 14 Jan 2003, Daniel Bretoi wrote: [snip] > 1. What if I want to do something like File.stat("filename").age.days ? > class File [snip] > 2. Is there a more elegant (different anway) way of defening my age [snip] class Stat def age Time.now - mtime end end does both i think. [snip] > 3. More in general.. how does the notation File::Stat actually work? The > Class is File::Stat, yet I access Stat with lowercase letters. [snip] File::Stat -> inner class File.stat -> method which just happens to return a File::Stat object -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================