From: Sean O'Halpin Date: 2010-09-23T12:22:52+09:00 Subject: Re: Ruby-based data language Hi Tom, maybe the Doodle gem does what you're after: require 'doodle' class Contact < Doodle has :email, :kind => String has :phone, :kind => String do must "be of form xxx-xxx-xxxx" do |s| s =~ /\d{3}-\d{3}-\d{4}/ end end end class Person < Doodle has :name, :kind => String has :age, :kind => Integer has Contact end class People < Doodle has :people, :collect => Person end people = People do person do name "Joe Foo" age 33 contact do email "joe.foo@example.com" phone "555-555-1234" end end end p people __END__ #>]> Regards, Sean