How can I write updating class parameter values more concisely

welcome to shbcf.ru