- Implemented `set_contacts` method to safely set phone, telegram, and email fields. - Made contact fields (`phone`, `telegram`, `email`) private and accessible only through `set_contacts`. - Added validation within `set_contacts` to ensure contact fields are correctly formatted. - Modified the `initialize` method to utilize `set_contacts` for setting contact values during object creation. - Added checks in the `validate` method to ensure Git presence and at least one contact method. - Updated test cases in `main.rb` to demonstrate correct and incorrect uses of contact modifications. - Ensured that contact fields cannot be modified directly, maintaining data integrity.pull/4/head lab2.1
parent
c1ca0ea845
commit
1407d3e6fd
Loading…
Reference in new issue