From: Ruby Freak Date: 2008-07-23T13:59:29+09:00 Subject: Is there a simple way to find a method definition? Hi, This example is specific to rspec and rails, but the question is generic to ruby. How do I find a method definition short of grep "def some_method_name"? Here is an example. I did a simple script/generate rspec_scaffold page title:string body:text and got a bunch of pre-generated specs. Very nice, now I am going through this to try and understand the code. I need to find mock_model so I can look at it (just an example) def mock_page(stubs={}) @mock_page ||= mock_model(Page, stubs) end Is there a simple tool/procedure to find def mock_model ? (or def some_method_name) Thanks in advance