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
     
    Ray Case, Jan 8, 2008
    #1
    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

    Podcast: http://hollywoodgrit.blogspot.com
    Blog: http://gilesbowkett.blogspot.com
    Portfolio: http://www.gilesgoatboy.org
    Tumblelog: http://giles.tumblr.com
     
    Giles Bowkett, Jan 8, 2008
    #2
    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.