<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: metaprogramming code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 26 Jul 2008 19:12:41 GMT</pubDate>
    <description>DZone Snippets: metaprogramming code</description>
    <item>
      <title>Get the name of the current method in Ruby</title>
      <link>http://snippets.dzone.com/posts/show/2366</link>
      <description>Found at &lt;a href="http://nubyonrails.com/articles/2006/08/04/seattle-rbbq"&gt;http://nubyonrails.com/articles/2006/08/04/seattle-rbbq&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;def method_name&lt;br /&gt;  if  /`(.*)'/.match(caller.first)&lt;br /&gt;    return $1&lt;br /&gt;  end&lt;br /&gt;  nil&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;def blah&lt;br /&gt;  puts method_name&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;blah  # =&gt; 'blah'&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Fri, 04 Aug 2006 19:22:00 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2366</guid>
      <author>jswizard (JavaScript Wizard)</author>
    </item>
  </channel>
</rss>
