Check where a method is defined in Ruby

As the ‘set’ method comes from the Sinatra gem, it will output the path to the base.rb file from the gem, and the line number.If you are using a Mac, you can open Finder, press Command Shift G and paste in the path above to navigate to it quickly, then you can open the file there.Sure enough, the ‘set’ method is on line 1262 of base.rb file from the Sinatra gem, thanks source_location!.
Check where a method is defined in Ruby #ruby #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper

Nezir Zahirovic

Freelance software developer Ruby On Rails (4 years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles