<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: operator code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Thu, 24 Jul 2008 17:08:42 GMT</pubDate>
    <description>DZone Snippets: operator code</description>
    <item>
      <title>redefine [] operator in ruby</title>
      <link>http://snippets.dzone.com/posts/show/2799</link>
      <description>// the parameter is written behind the operator in parantheses&lt;br /&gt;// the parameter must be an integer/fixnum&lt;br /&gt;//&lt;br /&gt;// i.e. &lt;br /&gt;// def [](chunk)&lt;br /&gt;//   @internal_id_hash[chunk.chunk_id]&lt;br /&gt;// end&lt;br /&gt;// is not possible&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;class ChunkList&lt;br /&gt;  ..&lt;br /&gt;&lt;br /&gt;  def [](chunk_id)&lt;br /&gt;    @internal_id_hash[chunk_id]&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sun, 08 Oct 2006 15:48:34 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2799</guid>
      <author>ovhaag (Oliver Haag)</author>
    </item>
  </channel>
</rss>
