Created
July 26, 2015 21:04
-
-
Save scaint/ad45b084e5cef50ae7aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Object.class_eval { def self.private; Object; end } | |
def MyClass | |
private | |
def some_method | |
end | |
end | |
MyClass.private_instance_methods.include? :some_method # => false | |
MyClass.public_instance_methods.include? :some_method # => true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment