Paul Murton wrote: > Hi, > > I have a whole load of objects which I would like to periodically dump > as YAML. However, in order to save on resources, I would prefer to only > dump those whose instance variables have changed since the last dump. > > Is it possible to somehow 'mark' an object when the value any of its > instance variables is changed? You can take a snapshot of the object and then do a comparsion later to determine what's changes. Facets has snapshot.rb (which came orignially from Michael Neumann's Wee) if you'd like to try it: http://facets.rubyforge.org/api/more/classes/Snapshot.html Hmm... a #snapshot_compare method might make a good addition. T.