From: Michael Gorsuch Date: 2006-05-08T22:09:24+09:00 Subject: Re: Class Methods ------=_Part_15395_27913328.1147093761513 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Edwin, Helge - thank you. I can't believe I didn't put that together. Have a great day. On 5/8/06, Helge Elvik wrote: > > One solution would be to use ruby-array's "set-like" functionality: > > onlyClassBMethods =3D ClassB.instance_methods - ClassA.instance_methods > > Don't know if this is what you're looking for? > > Regards, > Helge Elvik > > -----Original Message----- > From: Michael Gorsuch [mailto:michael.gorsuch@gmail.com] > Sent: 8. mai 2006 15:00 > To: ruby-talk ML > Subject: Class Methods > > Here's some simple code: > > def ClassA > def my_method > > end > end > > def ClassB < ClassA > def my_new_method > > end > end > > ----------- > > What is the best way to get a list of instance methods for ClassB, but > that > does not contain the parent class's methods? > > ClassB.instance_methods is returning all of them. I just want to see > 'my_new_method'. > > Any ideas? > > ------=_Part_15395_27913328.1147093761513--