<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>8th Light Blog: Unrubify</title>
    <link>http://blog.8thlight.com/articles/2007/12/19/unrubify</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>In the minds of the craftsmen...</description>
    <item>
      <title>Unrubify</title>
      <description>&lt;p&gt;Often times while writing meta programming code, I am using the eval function and doing manipulation on method/class/variable names.  Today I needed to unrubify a name.  I haven&amp;#8217;t seen this done regularly, and unfortunately there is no fun rails method to do it (there is one for rubifying a string).  So, here is my attempt at it, for anyone trying to solve the same problem.&lt;/p&gt;

&lt;pre&gt;
def unrubify(sentence)  
  sentence.capitalize!
  sentence.gsub!(/_(.)/) { $1.upcase }
  return sentence 
end  
&lt;/pre&gt; 

&lt;p&gt;Any suggestions on improvements please let me know!&lt;/p&gt;</description>
      <pubDate>Wed, 19 Dec 2007 21:01:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:8301f71e-1ce7-4134-97ff-9b524598b706</guid>
      <author>Paul Pagel</author>
      <link>http://blog.8thlight.com/articles/2007/12/19/unrubify</link>
      <category>Coding</category>
    </item>
    <item>
      <title>"Unrubify" by Paul W Pagel</title>
      <description>&lt;p&gt;Thank you!!! I thought it should be there somewhere, but couldn&amp;#8217;t find it.&lt;/p&gt;</description>
      <pubDate>Thu, 20 Dec 2007 16:01:24 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:16ddc6af-8fb2-458a-8a6d-5d26c35205e1</guid>
      <link>http://blog.8thlight.com/articles/2007/12/19/unrubify#comment-465</link>
    </item>
    <item>
      <title>"Unrubify" by Mark Van Holstyn</title>
      <description>&lt;pre&gt;&lt;code&gt;require 'active_support'
"this_is_a_word".camelize # =&amp;gt; "ThisIsAWord"
"this_is_a_word".camelize(:lower) # =&amp;gt; "thisIsAWord"
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Wed, 19 Dec 2007 23:59:24 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:f3496cf7-e15f-4d64-bd41-aba16ae32a62</guid>
      <link>http://blog.8thlight.com/articles/2007/12/19/unrubify#comment-464</link>
    </item>
  </channel>
</rss>
