-------- Forwarded Message -------- From: Charlie Bowman <firstname.lastname@example.org> 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.
on 2006-05-26 15:10
on 2006-05-26 15:13
I forgot to say thanks. Thanks!