From: Daniel Bretoi Date: 2003-01-14T07:46:50+09:00 Subject: subclasses Hello, To determine the age of a file in days, I decided to extend on the File::Stat class like this: class File class Stat def age age = Time.now.to_i - self.mtime.to_i return age / 60 / 60 / 24 end end end which, of course let's me find the age in days of a file by ding something like File.stat("filename").age My questions: 1. What if I want to do something like File.stat("filename").age.days ? 2. Is there a more elegant (different anway) way of defening my age method? 3. More in general.. how does the notation File::Stat actually work? The Class is File::Stat, yet I access Stat with lowercase letters. db -- Jan 13 Horatio Alger born, 1834 Jan 13 Sophie Tucker born, 1884 Jan 13 Wilhelm Wien born, 1864, Nobel prize for blackbody radiation laws Jan 13 National Liberation Day in Togo Jan 13* Adults Day in Japan Jan 13 Eric Clapton plays the "Rainbow Concert" in London, 1973