From: Gavri Savio Fernandez Date: 2003-11-29T03:10:11+09:00 Subject: Re: Need library for parsing configuration files > -----Original Message----- > From: T. Onoma [mailto:transami@runbox.com] > Subject: Re: Need library for parsing configuration files > > hi, > > i'm writing an application which needs to parse a > configuration file on > > program startup. is there a prefered format for > configuration files in > > ruby? is there a library for such a purpose? i suppose i > could do the > > parsing myself, but i was just wondering if there is a > sophisticated way > > out there. > > > > thank you > > I would consider Yaml. Yaml is human-readable-and-writable, agreed, but only if the human is a programmer :-) Actually the problem is that i want configuration values segregated into different groups. Users would find the Yaml syntax which requires indentation esoteric. how feasible is it to use Kernel::load() ? maybe i should let the user modify a ruby source-file, which looks kind of like this application.ui = true #true, false window.size = 1000 # 250 - 3000 images.max = 10 # 1 - 50 and then load this file at an appropriate time. is this a feasible way to do things? > > -t0 > > Gavri Savio Fernandez ___________________________________________ If only God would give me some clear sign! Like making a large deposit in my name at a Swiss bank. - Woody Allen