From: Toby Rodwell Date: 2006-09-25T01:30:22+09:00 Subject: Importing from YAML I've learned that a very quick and easy way to save a Ruby object to a file is to use YAML e.g. def saveMyObject File.open(self.fileName,"a+") { |f| f.write(self.to_yaml) f.close } end However, the article which showed this did not then explain how this process could be reversed. I assume there must be a an equivalent simple use of file 'read', but a straight forward 'read' seems to give just a string, and I can find no 'from_yaml' method whihc would read YAML-formatted text straight into a Ruby object (and thus re-create that object originally used to create the YAML file) . I'm sure there must be a quick and easy way to do this - any suggestions? Thanks in advance. -- Posted via http://www.ruby-forum.com/.