On Sat, Feb 2, 2013 at 10:04 PM, Joel Pearson <lists / ruby-forum.com> wrote:
> Robert Klemme wrote in post #1094583:
>> write your own - it is the most
>> reasonable thing to have a specific class for handling this instead of
>> writing functions which work with a nested Array structure.
>
> It's only just dawned on me just how useful this kind of thing could be.
> I could have a class tailor-made to my expected outputs, yet versatile
> enough to adapt to new challenges...

That's the whole point of OO - or rather software engineering in
general: create proper abstractions.  Advantage of OO is that one can
first reason about the interface and hide all the details behind that
- including the state necessary to make the interface of the class
work as needed.

> If I learn how to use blocks
> effectively as well, then it could do pretty much anything I need.
> All hail Ruby!

:-)

Cheers

robert


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