`@refname = (key or :name).to_sym` would be fine.