Last night I dreamed a dream. It was this:
family.add(dad, 48, mom, 44, ben, 22)
And so on. family is an object of class Family, and dad, mom, and ben are objects of class Person. The kicker in the dream was that I could parse the arguments (the add method would take *args for flexibility), taking the name of the object as whatever we wanted to add, then checking the next argument to see if it was a number. If so, it would be the age. If it was an object, it would be the next person.
And in my dream it was brilliant. In the light of day, however, I haven’t got a clue what on earth was so great about it. ~sigh~ :)
[tags]Ruby[/tags]
Throw in your two cents