A super-crude script that compares usage of methods in Ruby standard library using Google Code Search data
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README
method_counter.rb
results.csv

README

This is a simple script that gathers the methods known to the current
environment, and queries them on a Google Code Search for a number of 
occurrences using some certain rules.

== Usage ==

Just run the .rb file. If you want to test the methods of a certain gem in
addition to the standard library, modify the require's in the header 
accordingly.

== How it works? ==

All relevant comments are in the method_counter.rb file.

Just for the note, the way this script and Rails are written, it cannot analyze
Rails gems for their methods.

== Results ==

results.csv contains the sample (post-formatted) result file based on ~800
methods from ruby standard library, open-uri, cgi, rubygems and hpricot 
libraries.

The most used methods are, understandably, #new and #each. 

39 methods, including such gems as #default_system_source_cache_dir or
#is_complex_yaml? haven't been used a single time in Google Code Search db.

== License ==

This script and accompanying files are public domain.