From: Daniel Berger Date: 2005-08-14T06:06:15+09:00 Subject: Re: Ruby report generation tool Greg Brown wrote: > Daniel Berger wrote: > > I was just thinking that I should add a "config" directory for > > those things you can't really hard code in a generic way, such as a > > mailhost, etc. I'd use YAML. > > This exists in Ruport :) > The more I look through your code, the happier I am that you have > released it. > > Thank you! Without looking at Ruport, I added support for YAML config files in gruf. So, say you have a config file that looks like this: # foo.config host: blah.com mailhost: bar.com ENV: LD_LIBRARY_PATH: /usr/lib ORACLE_HOME: /opt/oracle Then you call Report#configure. This will automatically generate "host" and "mailhost" methods (accessors) for you, with the values set appropriately. The ENV tag is special in that it simply sets environment variables for your script (which I need sometimes). Checked into CVS. :) Regards, Dan