Guest User

Untitled

a guest
Dec 16th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. def const_source_location(const)
  2. if method_name = const.instance_methods.sort.find {|m| a.instance_method(m).owner == const }
  3. const.instance_method(method_name).source_location)
  4. else
  5. raise "`#{const}' has no uninherited/mixed in instance methods"
  6. end
  7. end
Add Comment
Please, Sign In to add comment