Skip to content

Instantly share code, notes, and snippets.

@havenwood
Created July 14, 2020 05:51
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 havenwood/aff3f56f3bbe5d928052696efa99d69c to your computer and use it in GitHub Desktop.
Save havenwood/aff3f56f3bbe5d928052696efa99d69c to your computer and use it in GitHub Desktop.
class Post
def Post.foo
:foo
end
def self.bar
:bar
end
class << self
def baz
:baz
end
end
end
Post.method(:foo).owner
#=> #<Class:Post>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment