Create a gist now

Instantly share code, notes, and snippets.

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