<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: super code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Mon, 06 Oct 2008 15:14:59 GMT</pubDate>
    <description>DZone Snippets: super code</description>
    <item>
      <title>How to call a base class method</title>
      <link>http://snippets.dzone.com/posts/show/5082</link>
      <description>This Ruby example demonstrates using the keyword super to call the superclass method.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;class Claw&lt;br /&gt;  def grab(item)&lt;br /&gt;    puts item + ' grabbed'&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;class Hand &lt; Claw&lt;br /&gt;  def grab(item)&lt;br /&gt;    super(item)&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;h = Hand.new&lt;br /&gt;h.grab('apple')&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;output &lt;br /&gt;&lt;code&gt;&lt;br /&gt;apple grabbed&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;for more information: http://www.google.com/search?q=ruby+keyword+super</description>
      <pubDate>Sat, 02 Feb 2008 00:51:59 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5082</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
  </channel>
</rss>
