From: Dreamcat Four Date: 2010-03-11T01:35:41+09:00 Subject: Re: Best / cleanest DSL for manipulating data files? Standard initializers seem better. Leaning toward b) # a) plist_opts = { :filename => "car.plist", :type => :vehicle_plist, :save_format => binary, :autoload => true, :autosave => false } car = Plist4r.new(plist_opts) { road_legal true brake_light_color "red" } car.save # b) car = Plist4r.new("car.plist") car.type = :vehicle_plist car.load # also detects plist type # not sure what to call this method # it overwrites any existing keys, # appending the new/replacement keys car << do road_legal true brake_light_color "red" end car.save(:binary => true) -- Posted via http://www.ruby-forum.com/.