In article <fH3X6.15287$Ne5.1044673 / e420r-sjo3.usenetserver.com>, "Dave Thomas" <Dave / pragmaticprogrammer.com> wrote: >> Is there a preferred way of parsing configuration files in Ruby? I >> suppose yacc/lex is ruled out? > > A cheap way that works in some circumstances is to write the > configuration in Ruby, and then just require the file in: > > logfile { > path "/var/log/mylog" > days_to_expire 10 > level :error > } It may prove to be an effective solution, however, I am having trouble figuring out how to extract the option / value pairs in the above example. My current solution would be to define attribute writers for path, days_to_expire and level, thus clouding Object's namespace. Anders Johannsen