ruby reflection of methods

Discussion in 'Ruby' started by Ray Case, Jan 8, 2008.

  1. Ray Case

    Ray Case Guest

    If I do something like:
    meth=method:)send) (or any other method)

    is there anyway to get the actual text of the send method? like
    meth.body or something?

    I don't actually need the text of the method, I was just wondering.

    Ray Case, Jan 8, 2008
    1. Advertisements

  2. If I do something like:
    There is such a way. Use the mighty and impressive Ruby2Ruby gem. It's
    downright scary.

    teh IRB session:
    => "def drink\n "glug"\nend"

    Giles Bowkett

    Giles Bowkett, Jan 8, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.