There are three ways to find out where a method is defined in Ruby using IRB:
- using the
source_locationdefined on the Method object - using the IRB
show_sourcecommand - displaying information about an object using
ls(for displaying the object but not the source file)