|
|
@ -2,13 +2,22 @@ class Student
|
|
|
|
attr_accessor :id, :surname, :name, :patronymic, :phone, :telegram, :email, :git
|
|
|
|
attr_accessor :id, :surname, :name, :patronymic, :phone, :telegram, :email, :git
|
|
|
|
|
|
|
|
|
|
|
|
def initialize(surname:, name:, patronymic:, id: nil, phone: nil, telegram: nil, email: nil, git: nil)
|
|
|
|
def initialize(surname:, name:, patronymic:, id: nil, phone: nil, telegram: nil, email: nil, git: nil)
|
|
|
|
@surname = surname
|
|
|
|
@surname = surname
|
|
|
|
@name = name
|
|
|
|
@name = name
|
|
|
|
@patronymic = patronymic
|
|
|
|
@patronymic = patronymic
|
|
|
|
@id = id
|
|
|
|
@id = id
|
|
|
|
@phone = phone
|
|
|
|
@phone = phone
|
|
|
|
@telegram = telegram
|
|
|
|
@telegram = telegram
|
|
|
|
@email = email
|
|
|
|
@email = email
|
|
|
|
@git = git
|
|
|
|
@git = git
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def to_s
|
|
|
|
|
|
|
|
"Student: #{@surname} #{@name} #{@patronymic}\n" \
|
|
|
|
|
|
|
|
"ID: #{@id || 'N/A'}\n" \
|
|
|
|
|
|
|
|
"Phone: #{@phone || 'N/A'}\n" \
|
|
|
|
|
|
|
|
"Telegram: #{@telegram || 'N/A'}\n" \
|
|
|
|
|
|
|
|
"Email: #{@email || 'N/A'}\n" \
|
|
|
|
|
|
|
|
"Git: #{@git || 'N/A'}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|