From: Leon Bogaert Date: 2008-05-11T09:19:46+09:00 Subject: Sharing variables between classes and instances Hi all, What I'm trying to achieve: add a variable to a class. Fill it with data. Every nstance of that class should have access to the data in that variable. But I want every instance be able to modify that variable, without modifying the original value of the variable. It's like adding methods to the singleton class of an instance (if I explain it properly). I think it becomes a lot clearer if you see the code I've written: http://pastie.caboo.se/194982 I thought this guy described what I needed: http://briancarper.net/2007/03/22/ruby-singleton-classes/ But even then I can't get it to work. Thanks in advance! Leon -- Posted via http://www.ruby-forum.com/.