On Feb 2, 2005, at 5:10 PM, "Fear Dubh" <Fear Dubh wrote:

> Great!  So the Ruby quiz has something that even a COBOL code-grinder 
> like
> me can have a go at.
>
> Here's a rather long-winded solution, but one I hope to be able to 
> expand on
> and reuse.
> I'd appreciate suggestions on how to improve my code and design.
>
> It uses a basic class to match rules composed of tuples.
> Each tuple is a regular expression and a proc object to
> handle the matching data.

There are some nice ideas in this solution.  Especially this class.  I 
like it.

Unfortunately, I'm busy tonight and thus had to complete the summary 
this afternoon.  Don't take it personally that it doesn't mention it.  
It's just a function of my schedule.

As for a suggestion, you might want to check out the csv library in 
Ruby's Standard Library.  Saves you from having to code that stuff 
yourself.  In this case, it's not a huge savings, but it's still 
probably a good habit to get into.

James Edward Gray II