On Fri, Jun 07, 2002 at 05:28:02AM +0900, Mathew Johnston wrote: > Hmm :) What I'm trying to do is ensure that only the object which > created another object can call it's methods. For example, object A > instantiates object B. In object B's initialize method, I would set an > object variable (@creator), referencing the object that called .new. On > method calls, I would "raise 'Method called by non-creator' if [insert > method to get ref to caller object].id == @creator.id" > > Is there another way to do this? > > Mat. Is your intent that some methods in object B will be callable by "non-creators"? If not, could you simply hide the instantation of object B inside object A? -- Alan Chen Digikata LLC http://digikata.com