Skip to content

Instantly share code, notes, and snippets.

@edisonywh
Last active November 9, 2018 11:25
Show Gist options
  • Save edisonywh/ded504988eb711b362a2d801cf575914 to your computer and use it in GitHub Desktop.
Save edisonywh/ded504988eb711b362a2d801cf575914 to your computer and use it in GitHub Desktop.
module Mystery
def resolved?
true
end
end
class Foo
extend Mystery
end
Foo.resolved? #=> true
Foo.singleton_class.instance_methods.grep(/resolved?/) #=> [:resolved?]
Foo.method(:resolved?) #=> #<Method: Class(Mystery)#resolved?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment