Skip to content

Instantly share code, notes, and snippets.

@sutanto
Created June 16, 2020 02:21
Show Gist options
  • Save sutanto/ca68dac02b9988b684ab8bccdb340ebb to your computer and use it in GitHub Desktop.
Save sutanto/ca68dac02b9988b684ab8bccdb340ebb to your computer and use it in GitHub Desktop.
Print all super methods' location
def print_supers(method_ref)
return unless method_ref
puts method_ref.source_location.to_s
print_supers method_ref.super_method
end
print_supers UsersController.new.method(:authenticate_user!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment