News for hackers. Stuff that matters.
Re:Ruby Hash Selector Pattern by emackn on Monday March 17, 2014 @09:14AM (#7414808)
At first glance, I was like "cool", let me check this out. Thinking about it a bit, I was wondering if this would ever pass a code review from my peers.

Probably not.

A Hash with values that are procs/lambdas? Seems like you are halfway to recognizing that you need an object.

But if you are having fun coding, that's all that matters, until you do a pull request with that in it ;)

Re:Ruby Hash Selector Pattern by twinn on Monday March 17, 2014 @02:43PM (#7417128)
Totally agree with not using this with procs/lambdas, but his first example seemed like a nice use case.