From: Jason Roelofs Date: 2007-10-04T06:40:14+09:00 Subject: Re: Config files ------=_Part_15110_23247470.1191447612872 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Config files should be plain Ruby (written of the top of my head). Why parse for yourself when Ruby has a perfectly fine one? config.ini param1 = value1 param2 = value2 ... parser.rb def method_missing(method_name, *args) if method_name.match(/=/) @config[method_name] = args[0] end end require "config.ini" @config["param1"] # => value1 This of course, or YAML, because that's just so bloody easy. Jason On 10/3/07, Terry Poulin wrote: > > BJ Dierkes wrote: > > I prefer using standard *nix style configuration files in the form of > > 'param = value'. I wrote a class to read this type of configuration > > file called ParseConfig. > > > > http://rubyforge.org/projects/parseconfig/ > > > > > > Ooo, thank you.. I've been meaning to look for some thing like that :-) > > > > > I have actually never needed to deal with config files from this > perspective. > Personally from the point of view of Joe Blow. I prefer a syntax like most > unix style config files. > > # Comment > parm = value > > Along with the ini file, it makes for a very easy to edit file. It's just > a > matter of figuring out what does what for the end user. (IMHO) > > > TerryP. > > > -- > > Email and shopping with the feelgood factor! > 55% of income to good causes. http://www.ippimail.com > > > ------=_Part_15110_23247470.1191447612872--