Archive for February, 2009

I needed to access a Ruby object member (attribute) today, dynamically, using a string variable to make the call.
In PHP I would have done this:
123$member_name = ‘dynamic_member_name’;

$object->$member_name;
After a bit of Googling I figured out the Ruby way:
123member_name = ‘dynamic_member_name’

object.send(member_name)
Hmmmmmm. Must say that feels a bit weird. I’m sure it’s proper OO though.

Weird, I found the zoom mode on my MacBook “13 today! Hold down the control key (ctrl) and move 2 fingers up the track pad. It’ll zoom the display. Handy to inspect those small graphic issues!


top