From: Neil Stevens Date: 2004-11-21T12:48:07+09:00 Subject: Re: Inner Class Relationship On Sun, 21 Nov 2004 03:41:47 +0000, Neil Stevens wrote: > class Inner > attr_accessor :callback > > def initialize > @callback = do > #nothing > end > end > > def somethingHappens > @callback.call > end > end > > class Outer > def initialize > @inner = Inner.new > @inner.callback = do > # something that is totally internal > end > end > end I missed a couple 'Proc.new's in there, but the idea should be clear enough I hope. -- Neil Stevens - neil@hakubi.us "The world is a dangerous place to live; not because of the people who are evil, but because of the people who don't do anything about it." -- Albert Einstein(?)