DEV Community

Discussion on: Hidden Gem(s): What Are Your Favorite Lesser-Known Ruby Features & Techniques? 💎💻

Collapse
 
kevinluo201 profile image
Kevin Luo

You can use obj.method(:a_method_name).source_location to know where the method, a_method_name, is defined. It's super useful when debugging so I don't need to "guess" what a method does