Skip to content

@peter /gist:314358
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
class Author
def invoke_inside(method, *args)
self.send(method, *args)
end
end
author = Article.first.author
def author.foobar
"foobar"
end
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.