You can use @username = opts.delete(:username)