Find out where the source of a method is defined.
If you've got a Method object reference to a class or instance's method, you can easily find out where it's defined:
Config.method(:setup).source_location
# ["/Users/billy/gems/config-2.2.1/lib/config.rb", 29]