Created
July 13, 2022 00:22
-
-
Save delonnewman/daa49c58b41aa33e7814728bde3daeb2 to your computer and use it in GitHub Desktop.
This file contains 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
def method_query(object:, args: [], output:) | |
object.methods.select { |m| begin object.dup.public_send(m, *args) == output; rescue => e; nil end } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment