You can pass strings to instance_variable_get.