title: The shape inheritance example and "The Ruby way"
body: <p>In my quest to transition from a decade of C++ to Ruby, I find myself second guessing how to accomplish the simplest things.  Given the classic shape derivation example below, I'm wondering if this is "The Ruby Way".  While I believe there's nothing inherently wrong with the code below, I'm left feeling that I'm not harnessing the full power of Ruby.</p>
  
  <pre><code>class Shape
    def initialize
    end
  end
  
  class TwoD &lt; Shape
    def initialize
      super()
    end
  
    def area
       return 0.0
    end
  end
  
  class Square &lt; TwoD
    def initialize( side )
      super()
      @side = side
    end
  
    def area
      return @side * @side
    end
  end
  
  def shapeArea( twod )
    puts twod.area
  end
  
  square = Square.new( 2 )
  
  shapeArea( square ) # =&gt; 4
  </code></pre>
  
  <p>Is this implemented "The Ruby Way"?  If not, how would you have implemented this?</p>