Saving objects to files

Is there a way to save an object (say, a hash map) to a file, and then
retrieve the object from the file?

Thanks

···

--
Posted via http://www.ruby-forum.com/.

http://www.ruby-doc.org/core/classes/Marshal.html

···

On 30/07/06, Ell Quing <turtlethief@hotmail.com> wrote:

Is there a way to save an object (say, a hash map) to a file, and then
retrieve the object from the file?

Thanks

Ell Quing wrote:

Is there a way to save an object (say, a hash map) to a file, and then retrieve the object from the file?

Marshal and YAML are the easiest. Depending on your need you might want to use PStore or a database. HTH

Kind regards

  robert