From: "David A. Black" Date: 2007-08-24T06:55:54+09:00 Subject: Re: Once more unto the breach: private class methods Hi -- On Fri, 24 Aug 2007, Zeekar wrote: > On Aug 23, 5:02 pm, "David A. Black" wrote: > >> It seems like you're threading a very narrow needle. Do you mean that >> you would not want class methods to see each other? > > Not at all. I want to define a method C.foo() that other classes > outside of C can't call directly. Other class methods of C can call > it, fine. But the goal is to have *instances* of C to be able to call > it. OK -- I didn't get that; there was something to the effect that you wanted instance methods, but not singleton or class methods, to be able to call these methods, which is what confused me. > I guess I could make it a private instance method that just happens > not to care about self., but that seems like misleading design. The code I came up with is similar to Ara's, except that I didn't make the instance method version private which I believe probably does make sense. David -- * Books: RAILS ROUTING (new! http://www.awprofessional.com/title/0321509242) RUBY FOR RAILS (http://www.manning.com/black) * Ruby/Rails training & consulting: Ruby Power and Light, LLC (http://www.rubypal.com)