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 #rubydeveloper #rubyonrails https://rubyonrails.ba/single/check-where-a-method-is-defined-in-ruby

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles