From: Charlie Bowman Date: 2006-05-26T22:07:20+09:00 Subject: [Fwd: Re: How to access a classes private method] --=-WyzRmvkpock/PjdmVMen Content-Type: text/plain Content-Transfer-Encoding: 7bit -------- Forwarded Message -------- From: Charlie Bowman Subject: Re: How to access a classes private method Date: Fri, 26 May 2006 09:07:04 -0400 I'm trying to modify someone else's class. I am not the creator of Foo::Bar, I just want to use their methods. This is actually for a rails plugin I'm developing. > > If you need to access it outside of an instance, why make it protected? > How are you using this? > > Anyway, onto the solution: > > def calling_protected_method > result = Foo::Bar.new.method(:bars_method).call > end > Charlie Bowman Programmer Castle Branch Inc. Charlie Bowman Programmer Castle Branch Inc. --=-WyzRmvkpock/PjdmVMen--