Skip to content

Instantly share code, notes, and snippets.

@markburns
Created October 19, 2017 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markburns/c49bb6d98e4030a34e2e281662749f71 to your computer and use it in GitHub Desktop.
Save markburns/c49bb6d98e4030a34e2e281662749f71 to your computer and use it in GitHub Desktop.
module SomeClass
SomeClass == self
def self.a_class_method(options)
SomeClass == self
end
class << self
SomeClass.singleton_class == self
def another_class_method(options)
SomeClass == self
end
private
def yet_another_class_method(to)
SomeClass == self
end
end
def some_instance_method
self.is_a?(SomeClass)
self.class == SomeClass
self != SomeClass
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment