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.
···
-------- Forwarded Message --------
From: Charlie Bowman <charlie@castlebranch.com>
Subject: Re: How to access a classes private method
Date: Fri, 26 May 2006 09:07:04 -0400