On Sun, Feb 3, 2013 at 11:43 PM, Joel Pearson <[email protected]> wrote:
> I decided to try and build on the Array class as I don't really
> understand Matrices yet. I've added a few handy methods. The hidden Bang
> stuff is justified, I think, as this class is intended to mimic Excel's
> layout.

> class Excel_Sheet<Array

I wouldn't do that.  With the basic types it is usually much better to
use delegation (i.e. have a member of that type) than exposing the
full API via inheritance.  The whole point of OO is to control
internal state which is usually quite difficult when exposing a
complete API of Array because anybody can insert and remove elements.

Btw. the "self." in your code are superfluous.

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

-- 
[email protected] | 
https://groups.google.com/d/forum/ruby-talk-google?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"ruby-talk-google" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to