From: Francis Hwang Date: 2004-11-21T08:55:07+09:00 Subject: Re: Inner Class Relationship Since you haven't said much about how you're using this, maybe my answer will be a little presumptive, but: Is there are a particular reason you want the inner class to relate to the outer class this way? When I used inner classes (which is a lot), the relationship between the two is usually fairly clear: The outer class uses an instance of the inner class to delegate some small piece of logic, but the inner class doesn't know much about the outer class as a whole and doesn't change its state. Something like: class Outer def outer_method inner = Inner.new result = inner.inner_method do_something_based_on result end class Inner def inner_method end end end It's possible that doing it this way violates Tell Don't Ask, but it seems to work fine for me. F. On Nov 20, 2004, at 5:31 PM, James Edward Gray II wrote: > I have an inner class that needs to send it's parent object (outer > class) a message when a certain event occurs. > > I would rather not create a method in the outer class for this as it > is a messy implementation detail that should be hidden away under lock > and key. > > Any suggestions for a clean way to implement this? It's a blind spot > for me. > > Thanks. > > James Edward Gray II > > > Francis Hwang http://fhwang.net/