From: Raul Parolari Date: 2007-11-12T15:48:20+09:00 Subject: Re: Getting methods defined in the top scope Thilina Buddhika wrote: > > I am trying to get the names of the methods defined by myself in the top > scope. I tried it by using > " self.class.private_instance_methods(false).sort " > > But it gives two additional methods given below. > inherited > initialize > > but i want to get only the methods defined by my self. Is there any way > to solve this ? > > thanks! > > regards, > buddhika In the same line of thought as previous response, but more concise: not_mine = %w[initialize .. ] my_methods = Object.private_instance_methods(false) - not_mine -- Posted via http://www.ruby-forum.com/.