From: Stefano Crocco Date: 2006-11-17T01:43:06+09:00 Subject: Re: Accessing base method... Soso Soso wrote: > Hi all, > > I'm new to ruby, being trying to access base class method but with no > luck until now. Here's a snippet to get an idea: > > > class Parent > def knox > puts 'parent' > end > end > > class Child < Parent > def knox > puts 'child' > end > def test > knox # here I want to call knox method from Parent class... ?? > end > end > > Thanks, > -soso If you want to be able to call a base class's method after having overriden it, you should use alias_method. It's an instance method of class Module (and so it can be used within a class definition), which makes a copy of the given method with a new name. You should use it this way: class Child < Parent alias_method :parent_knox, :knox def knox puts 'child' end def test parent_knox knox # here I want to call knox method from Parent class... ?? end end If you need to call the parent's method in the method which is overriding it, instead (in your case in the body of Child's knox method), you do so using the super keyword: class Child