@ -30,6 +30,7 @@ classDiagram
+ phone=(String) : Boolean
+ telegram=(String) : Boolean
+ email=(String) : Boolean
+ surname_initials() : NotImplementedError
+ valid_phone_number() : Boolean <<class>>
+ valid_telegram() : Boolean <<class>>
+ valid_email() : Boolean <<class>>
@ -21,7 +21,7 @@ def test_classes
email: 'ivanov@example.com'
)
puts "Student Full Info: #{student.to_s}"
puts "Student Initials: #{student.surname_and_initials}"
puts "Student Initials: #{student.surname_initials}"
puts "Student Contact Info: #{student.get_first_contact}"
student_short = StudentShort.from_student(student)
@ -12,6 +12,10 @@ class Person
@git = git
end
def surname_initials
raise NotImplementedError, "#{self.class} must implement the 'surname_initials' method"
def git_present?
!@git.nil? && !@git.empty?
@ -12,7 +12,7 @@ class StudentShort < Person
def self.from_student(student)
new(
id: student.id,
surname_initials: student.surname_and_initials,
surname_initials: student.surname_initials,
phone: student.phone,
telegram: student.telegram,
email: student.email