From: Tom Sawyer Date: 2003-01-06T18:30:35+09:00 Subject: Re: How many single Methods provides Ruby ? off top of my head: mt = 0; cm = 0; im = 0; Module.constants.each { |c| cnst = eval "#{c}" if cnst.respond_to?(:public_class_methods) cnst.public_class_methods.each { |m| puts m; cm +=1; mt +=1 } end if cnst.respond_to?(:public_instance_methods) cnst.public_class_methods.each { |m| puts m; im +=1; mt +=1 } end end puts puts "Total Public Class Methods: #{cm}" puts "Total Public Instance Methods: #{im}" puts "Total Public Methods: #{mt}" probably needs tweaking. and it only considers public methods, no private or protected, though those are easy enough to add. it is UNTESTED. but something along these lines will get you there. let me know what you find out! -transami On Monday 06 January 2003 02:09 am, Jonas Hoffmann wrote: > Hi ! > > I working on my Page www.selfruby.de a Reference to Ruby in German. Right > now i'm make the Input of all the Methods/Classes/Constances etc. and its a > really hard Job because it is a lot of Stuff. By now i have about 200 > Methods but i dont know how many there are out there in the whole > Objekt_Space. Does anyone know how many methods Ruby provides or has anyone > a small Script which puts out the count ? I mean all the Methods from the > builtIns and StandardLib which are in Matz' Book 'Ruby in a Nutshell'. > > mfg. Jonas Hoffmann > > PS: I need this count to have a sign at the Horizont, that makes the work > easier if i can see the goalline.