I would rather these be separate if statements tbh; I don't think much is gained by combining them into a hash. Also, you're unnecessarily getting gem_info.send(attr) twice.