Created
April 7, 2013 03:23
-
-
Save epitron/5328790 to your computer and use it in GitHub Desktop.
Uses Pry to shows undocumented methods of Ruby classes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'pry' | |
| ObjectSpace.each_object do |o| | |
| o.methods(false).each do |meth| | |
| name = "#{o.class}##{meth}" | |
| result = Pry::Method.from_str(name) | |
| if result.nil? | |
| puts "#{name}" | |
| elsif result.source_location.nil? | |
| puts "#{name} (#{result.source_type})" | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment