Skip to content

Instantly share code, notes, and snippets.

@bbuchalter
bbuchalter / where_is.rb
Created January 26, 2020 14:13 — forked from wtaysom/where_is.rb
A little Ruby module for finding the source location where class and methods are defined.
module Where
class <<self
attr_accessor :editor
def is_proc(proc)
source_location(proc)
end
def is_method(klass, method_name)
source_location(klass.method(method_name))