Is this the correct way to do this? I'd have to ask a Rubyist to be sure.