Evan Moseman
10/26/2007 9:38:00 PM
On Oct 26, 2007, at 12:09 PM, snacktime wrote:
> So I'm hacking on rails and in activerecord there are two methods that
> have public and private versions. I need to override the private
> method. How would I go about doing that?
>
> Chris
>
If I understand what you are trying to do, this is typically how I do
that:
class Private
def run_func
you_cant_change_me
end
private
def you_cant_change_me
puts "you can't change me!"
end
end
class Private
private
def you_cant_change_me
puts "you changed me!"
end
end
a = Private.new
a.run_func
--
Evan