<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: rake code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 14:43:31 GMT</pubDate>
    <description>DZone Snippets: rake code</description>
    <item>
      <title> Easier path construction using overloaded /</title>
      <link>http://snippets.dzone.com/posts/show/5285</link>
      <description>&lt;br /&gt;Especially when writing rake tasks where a lot of path construction code is written the following overloading of the / operator makes the code more readable.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;class String&lt;br /&gt;  def /(other)&lt;br /&gt;    File.join(self,other)&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;# and you can write&lt;br /&gt;#   path = all/along/the/watch/tower&lt;br /&gt;# instead of &lt;br /&gt;#   path = "#{all}/#{along}/#{the}/#{watch}/#{tower}"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Fri, 28 Mar 2008 15:15:50 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5285</guid>
      <author>shmul (Shmulik Regev)</author>
    </item>
  </channel>
</rss>
