Hi! This sounds VERY cool! I will definitly have a look at this tomorrow!! Thanks! :-D Cheers, KS. Bill Kelly wrote: > From: "trans. (T. Onoma)" <transami / runbox.com> > >>On Monday 20 September 2004 04:14 pm, Kristian Srensen wrote: >> >>>Thanks for both your suggestions! That was just what I needed! :-) >> >>There's also YAML. > > [...] > >>Nice thing about YAML is that the file it creates is human readable and >>editable! > > > Additionally YAML supports a drop-in PStore equivalent, so if your code > is already structured to use PStore, you can a YAML::Store the same way. > > require 'yaml/store' > > ystore = YAML::Store.new("my_datafile.ystore") > > # use ystore just as you would a pstore: > > my_hash = {"a"=>1, "b"=>2} > my_array = %w(dog cat elephant) > > # store stuff in the database > > ystore.transaction do > ystore["my_hash"] = my_hash > ystore["my_array"] = my_array > end > > # print out all keys/values in database > > ystore.transaction do > ystore.roots.each do |key| > puts ystore[key].inspect > end > end > > > # note the above code is untested > > > Regards, > > Bill > > > >