refactor: freeze StudentShort instance after initialization

lab2
Artem-Darius Weber 3 days ago
parent 5ec7fb96d1
commit e327cf09f6

@ -6,6 +6,7 @@ class StudentShort < Person
def initialize(id:, surname_initials:, phone: nil, telegram: nil, email: nil)
super(id: id, phone: phone, telegram: telegram, email: email)
@surname_initials = surname_initials
freeze
end
def self.from_student(student)

Loading…
Cancel
Save