From: Daniel Carrera Date: 2003-01-26T12:37:18+09:00 Subject: Re: datafiles as Ruby source musings On Sun, Jan 26, 2003 at 12:12:31PM +0900, ahoward wrote: > > Does anybody have a nice hint or better trick to create data- or config files > > readable with Ruby without having to write parsers in ruby? For simple config files, you could write it in Ruby itself: =============== config.rb ============= module Conf VALUE = 7 Array = [1,2,3] # You must use constants so they # are visible in your file. end ============== your_program.rb ========== require 'config.rb' # Can use C::VALUE and C::Array -- Daniel Carrera Graduate Teaching Assistant. Math Dept. University of Maryland. (301) 405-5137