Omar Moreno wrote:
> For in the case of my small program, instead of using a static variable,
> it's just better to store the info on a file.

You can use this pattern to save and load a Ruby object: it has the 
advantage of saving a complete object graph if this object contains 
objects which in turn contain other objects etc.

File.open("myobj.rbm","wb") { |f| Marshal.dump(myobj, f) }

...

myobj = File.open("myobj.rbm","rb") { |f| Marshal.load(f) }
-- 
Posted via http://www.ruby-forum.com/.