# YAML utility methods # from "Learn to Program" by Chris Pine, pp. 99-100 def yaml_save object, filename File.open filename, 'w' do |f| f.write(object.to_yaml) end end def yaml_load filename yaml_string = File.read filename YML::load yaml_string end