Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def const_source_location(const)
- if method_name = const.instance_methods.sort.find {|m| a.instance_method(m).owner == const }
- const.instance_method(method_name).source_location)
- else
- raise "`#{const}' has no uninherited/mixed in instance methods"
- end
- end
Add Comment
Please, Sign In to add comment