Created
June 16, 2020 02:21
-
-
Save sutanto/ca68dac02b9988b684ab8bccdb340ebb to your computer and use it in GitHub Desktop.
Print all super methods' location
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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