Skip to content
Create a gist now

Instantly share code, notes, and snippets.

class Author
def invoke_inside(method, *args)
self.send(method, *args)
author =
def author.foobar
author.object_id # => 9969140
author.respond_to?(:foobar) # => true
author.class # => Author
author.invoke_inside(:object_id) # => 9952490
author.invoke_inside(:respond_to?, :foobar) # => false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.