From: Harry Ohlsen Date: 2002-08-04T22:42:41+09:00 Subject: Re: Detecting when an instance variable is created/set To give you a feel for what I want to do ... In the constructor of, say, Album, I'd like something like this, without forcing the user to write the "Wrapper.new()" class Album def initialize(title, songs) @title = Wrapper.new(title) @songs = songs.map { |s| Wrapper.new(s) } end end Ie, what I want the user to be able to write is class Album def initialize(title, songs) @title = title @songs = songs end end Now, if I could catch the "@x = ..." lines I could automate this. Actually, in my real system, I would only modify what gets stored in @songs, not what gets stored in @title, but I have a way to determine whether I need to make the conversion.