-
-
Save jayrobin/7e89a81aeac3b2d3cc0ba9bb23c0f46f to your computer and use it in GitHub Desktop.
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 some_method | |
# this method is in the global scope and therefore is added to ‘Object’ | |
end | |
class MyClass | |
end | |
puts MyClass.private_methods.include?(:some_method) # true | |
my_class = MyClass.new | |
puts my_class.private_methods.include?(:some_method) # true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment