From: "Ara.T.Howard" Date: 2004-05-05T07:14:00+09:00 Subject: Re: IO::write On Tue, 4 May 2004, Charles Comstock wrote: > Robert Klemme wrote: > > > > > > Did you consider using a logging framework? e.g. log4r > > http://log4r.sourceforge.net/ > > > > > > Actually in this case a logging approach wouldn't have been quite what I > needed. I could have used it, but it was more that I was using lots of > small files to tag metainfo to a directory, so the log would not have > been the best solution. > > Maybe it shouldn't be read, maybe it should be readfile and writefile, > as well as appendfile. I'm trying to find a nice orthogonal set that > still makes symantic sense. > > Charlie how about class File def File.read(path) ... end def File.write(path, buf) ... end def File.append(path, buf) ... end end ?? -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328 | URL :: http://www.ngdc.noaa.gov/stp/ | TRY :: for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done ===============================================================================