rubbish_code 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/LICENSE.txt +37 -0
 - data/README.md +1 -0
 - data/lib/controllers/student_input_form/student_input_form_controller_create.rb +48 -0
 - data/lib/controllers/student_input_form/student_input_form_controller_edit.rb +56 -0
 - data/lib/controllers/tab_students_controller.rb +75 -0
 - data/lib/models/student.rb +103 -0
 - data/lib/models/student_base.rb +100 -0
 - data/lib/models/student_short.rb +50 -0
 - metadata +64 -0
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA256:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b4b21965f0130ca61a48365f3da378ad726bf29a211ee6d2327cc825e0eb8449
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: b19d9d9517f6a90fa30f7ac0e0426e71d34a0a3d80e29e59e1105f439884fb70
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: eb08de61aa853a490678f922b6ef29ccbf30af3e00f3f9cd3a50ab98db4feae77b0a2f99f5301601712dd7f13112d1b9fb5c1fe6b6abf50148c8d006c435c8ee
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: b6e3c9963cc335cb5b957c7fbda8ce9e80d639b6021016b607a1a179131a2dfc5732217d1818879f24f7e41477846db7e5c573f5d2fa1923110bb8e34a2b39ab
         
     | 
    
        data/LICENSE.txt
    ADDED
    
    | 
         @@ -0,0 +1,37 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            MIT License
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Copyright (c) 2023 NullExp
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Класс TabStudentsController представляет собой контроллер для работы с интерфейсом взаимодействия с объектами типа Student.
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            Методы класса:
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            1. initialize(view) - конструктор класса, принимает объект представления (view) и создает пустой объект типа
         
     | 
| 
      
 10 
     | 
    
         
            +
            DataListStudentShort, которому присваивается метод add_listener с аргументом view, в результате чего представление
         
     | 
| 
      
 11 
     | 
    
         
            +
            устанавливается в качестве слушателя событий изменения состояния данных (data_list).
         
     | 
| 
      
 12 
     | 
    
         
            +
            2. on_view_created - метод, инициализирующий объект типа StudentRepository, который используется для взаимодействия
         
     | 
| 
      
 13 
     | 
    
         
            +
            с базой данных, и при возникновении ошибки подключения к базе выводит диалоговое окно с сообщением об ошибке.
         
     | 
| 
      
 14 
     | 
    
         
            +
            3. show_view - метод, отображающий основное окно приложения.
         
     | 
| 
      
 15 
     | 
    
         
            +
            4. show_modal_add - метод, отображающий модальное окно для создания новой записи о студенте.
         
     | 
| 
      
 16 
     | 
    
         
            +
            Создает экземпляр контроллера StudentInputFormControllerCreate и передает ему ссылку на текущий контроллер,
         
     | 
| 
      
 17 
     | 
    
         
            +
            создает объект типа StudentInputForm и передает ему ссылку на контроллер. После чего отображает модальное окно.
         
     | 
| 
      
 18 
     | 
    
         
            +
            5. show_modal_edit(current_page, per_page, selected_row) - метод, отображающий модальное окно для
         
     | 
| 
      
 19 
     | 
    
         
            +
            редактирования записи о студенте. Принимает значения текущей страницы (current_page), количества записей на странице
         
     | 
| 
      
 20 
     | 
    
         
            +
            (per_page) и выбранной строки (selected_row). Вычисляет номер выбранного студента и выбирает его id из
         
     | 
| 
      
 21 
     | 
    
         
            +
            объекта DataListStudentShort, после чего передает его в контроллер StudentInputFormControllerEdit, создает объект типа
         
     | 
| 
      
 22 
     | 
    
         
            +
            StudentInputForm и передает ему ссылку на контроллер. После чего отображает модальное окно.
         
     | 
| 
      
 23 
     | 
    
         
            +
            6. delete_selected(current_page, per_page, selected_row) - метод, удаляющий выбранную запись о студенте.
         
     | 
| 
      
 24 
     | 
    
         
            +
            Принимает значения текущей страницы (current_page), количества записей на странице (per_page)
         
     | 
| 
      
 25 
     | 
    
         
            +
            и выбранной строки (selected_row). Вычисляет номер выбранного студента и выбирает его id из объекта DataListStudentShort,
         
     | 
| 
      
 26 
     | 
    
         
            +
            после чего удаляет запись с помощью метода remove_student из объекта типа StudentRepository.
         
     | 
| 
      
 27 
     | 
    
         
            +
            7. refresh_data(page, per_page) - метод, обновляющий данные в списке студентов. Принимает значения
         
     | 
| 
      
 28 
     | 
    
         
            +
            текущей страницы (page) и количества записей на странице (per_page).
         
     | 
| 
      
 29 
     | 
    
         
            +
            Вызывает метод типа StudentRepository paginated_short_students для получения данных в формате объекта DataListStudentShort.
         
     | 
| 
      
 30 
     | 
    
         
            +
            Обновляет информацию о количестве студентов с помощью метода update_student_count представления.
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            Контроллер Student_Input_Form_Controller_Edit и Student_Input_Form_Controller_Create представляют собой формы
         
     | 
| 
      
 33 
     | 
    
         
            +
            для изменения и создания студентов в базу данных, соотвественно.
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
            Модели student, student_base и student_short представляет собой модель студента с различными полями и методами
         
     | 
| 
      
 36 
     | 
    
         
            +
            для установки, получения и обработки информации. Student_base - супер класс,
         
     | 
| 
      
 37 
     | 
    
         
            +
            а student_short - короктая информация о студенте.
         
     | 
    
        data/README.md
    ADDED
    
    | 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            
         
     | 
| 
         @@ -0,0 +1,48 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require 'win32api'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            class StudentInputFormControllerCreate
         
     | 
| 
      
 6 
     | 
    
         
            +
              def initialize(parent_controller)
         
     | 
| 
      
 7 
     | 
    
         
            +
                @parent_controller = parent_controller
         
     | 
| 
      
 8 
     | 
    
         
            +
              end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              def set_view(view)
         
     | 
| 
      
 11 
     | 
    
         
            +
                @view = view
         
     | 
| 
      
 12 
     | 
    
         
            +
              end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
              def on_view_created
         
     | 
| 
      
 15 
     | 
    
         
            +
                begin
         
     | 
| 
      
 16 
     | 
    
         
            +
                  @student_rep = StudentRepository.new(DBSourceAdapter.new)
         
     | 
| 
      
 17 
     | 
    
         
            +
                rescue Mysql2::Error::ConnectionError
         
     | 
| 
      
 18 
     | 
    
         
            +
                  on_db_conn_error
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              def process_fields(fields)
         
     | 
| 
      
 23 
     | 
    
         
            +
                begin
         
     | 
| 
      
 24 
     | 
    
         
            +
                  last_name = fields.delete(:last_name)
         
     | 
| 
      
 25 
     | 
    
         
            +
                  first_name = fields.delete(:first_name)
         
     | 
| 
      
 26 
     | 
    
         
            +
                  father_name = fields.delete(:father_name)
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                  return if last_name.nil? || first_name.nil? || father_name.nil?
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                  student = Student.new(last_name, first_name, father_name, **fields)
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                  @student_rep.add_student(student)
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                  @view.close
         
     | 
| 
      
 35 
     | 
    
         
            +
                rescue ArgumentError => e
         
     | 
| 
      
 36 
     | 
    
         
            +
                  api = Win32API.new('user32', 'MessageBox', ['L', 'P', 'P', 'L'], 'I')
         
     | 
| 
      
 37 
     | 
    
         
            +
                  api.call(0, e.message, 'Error', 0)
         
     | 
| 
      
 38 
     | 
    
         
            +
                end
         
     | 
| 
      
 39 
     | 
    
         
            +
              end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
              private
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
              def on_db_conn_error
         
     | 
| 
      
 44 
     | 
    
         
            +
                api = Win32API.new('user32', 'MessageBox', ['L', 'P', 'P', 'L'], 'I')
         
     | 
| 
      
 45 
     | 
    
         
            +
                api.call(0, "No connection to DB говно", "Error", 0)
         
     | 
| 
      
 46 
     | 
    
         
            +
                @view.close
         
     | 
| 
      
 47 
     | 
    
         
            +
              end
         
     | 
| 
      
 48 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,56 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require 'win32api'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            class StudentInputFormControllerEdit
         
     | 
| 
      
 6 
     | 
    
         
            +
              def initialize(parent_controller, existing_student_id)
         
     | 
| 
      
 7 
     | 
    
         
            +
                @parent_controller = parent_controller
         
     | 
| 
      
 8 
     | 
    
         
            +
                @existing_student_id = existing_student_id
         
     | 
| 
      
 9 
     | 
    
         
            +
              end
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
              def set_view(view)
         
     | 
| 
      
 12 
     | 
    
         
            +
                @view = view
         
     | 
| 
      
 13 
     | 
    
         
            +
              end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              def on_view_created
         
     | 
| 
      
 16 
     | 
    
         
            +
                begin
         
     | 
| 
      
 17 
     | 
    
         
            +
                  @student_rep = StudentRepository.new(DBSourceAdapter.new)
         
     | 
| 
      
 18 
     | 
    
         
            +
                rescue Mysql2::Error::ConnectionError
         
     | 
| 
      
 19 
     | 
    
         
            +
                  on_db_conn_error
         
     | 
| 
      
 20 
     | 
    
         
            +
                end
         
     | 
| 
      
 21 
     | 
    
         
            +
                @existing_student = @student_rep.student_by_id(@existing_student_id)
         
     | 
| 
      
 22 
     | 
    
         
            +
                #@view.make_readonly(:git, :telegram, :email, :phone)
         
     | 
| 
      
 23 
     | 
    
         
            +
                populate_fields(@existing_student)
         
     | 
| 
      
 24 
     | 
    
         
            +
              end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
              def populate_fields(student)
         
     | 
| 
      
 27 
     | 
    
         
            +
                @view.set_value(:last_name, student.last_name)
         
     | 
| 
      
 28 
     | 
    
         
            +
                @view.set_value(:first_name, student.first_name)
         
     | 
| 
      
 29 
     | 
    
         
            +
                @view.set_value(:father_name, student.father_name)
         
     | 
| 
      
 30 
     | 
    
         
            +
                @view.set_value(:git, student.git)
         
     | 
| 
      
 31 
     | 
    
         
            +
                @view.set_value(:telegram, student.telegram)
         
     | 
| 
      
 32 
     | 
    
         
            +
                @view.set_value(:email, student.email)
         
     | 
| 
      
 33 
     | 
    
         
            +
                @view.set_value(:phone, student.phone)
         
     | 
| 
      
 34 
     | 
    
         
            +
              end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
              def process_fields(fields)
         
     | 
| 
      
 37 
     | 
    
         
            +
                begin
         
     | 
| 
      
 38 
     | 
    
         
            +
                  new_student = Student.from_hash(fields)
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
                  @student_rep.replace_student(@existing_student_id, new_student)
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                  @view.close
         
     | 
| 
      
 43 
     | 
    
         
            +
                rescue ArgumentError => e
         
     | 
| 
      
 44 
     | 
    
         
            +
                  api = Win32API.new('user32', 'MessageBox', ['L', 'P', 'P', 'L'], 'I')
         
     | 
| 
      
 45 
     | 
    
         
            +
                  api.call(0, e.message, 'Error', 0)
         
     | 
| 
      
 46 
     | 
    
         
            +
                end
         
     | 
| 
      
 47 
     | 
    
         
            +
              end
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
              private
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
              def on_db_conn_error
         
     | 
| 
      
 52 
     | 
    
         
            +
                api = Win32API.new('user32', 'MessageBox', ['L', 'P', 'P', 'L'], 'I')
         
     | 
| 
      
 53 
     | 
    
         
            +
                api.call(0, "No connection to DB", "Error", 0)
         
     | 
| 
      
 54 
     | 
    
         
            +
                @view.close
         
     | 
| 
      
 55 
     | 
    
         
            +
              end
         
     | 
| 
      
 56 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,75 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require './LabStudents/views/main_window'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require './LabStudents/repositories/student_repository'
         
     | 
| 
      
 5 
     | 
    
         
            +
            require './LabStudents/repositories/adapters/db_source_adapter'
         
     | 
| 
      
 6 
     | 
    
         
            +
            require './LabStudents/repositories/containers/data_list_student_short'
         
     | 
| 
      
 7 
     | 
    
         
            +
            require './LabStudents/views/student_input_form'
         
     | 
| 
      
 8 
     | 
    
         
            +
            require './LabStudents/controllers/student_input_form/student_input_form_controller_create'
         
     | 
| 
      
 9 
     | 
    
         
            +
            require './LabStudents/controllers/student_input_form/student_input_form_controller_edit'
         
     | 
| 
      
 10 
     | 
    
         
            +
            require 'win32api'
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            class TabStudentsController
         
     | 
| 
      
 13 
     | 
    
         
            +
              def initialize(view)
         
     | 
| 
      
 14 
     | 
    
         
            +
                @view = view
         
     | 
| 
      
 15 
     | 
    
         
            +
                @data_list = DataListStudentShort.new([])
         
     | 
| 
      
 16 
     | 
    
         
            +
                @data_list.add_listener(@view)
         
     | 
| 
      
 17 
     | 
    
         
            +
              end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
              def on_view_created
         
     | 
| 
      
 20 
     | 
    
         
            +
                #begin
         
     | 
| 
      
 21 
     | 
    
         
            +
                  @student_rep = StudentRepository.new(DBSourceAdapter.new)
         
     | 
| 
      
 22 
     | 
    
         
            +
                # rescue Mysql2::Error::ConnectionError
         
     | 
| 
      
 23 
     | 
    
         
            +
                #   on_db_conn_error
         
     | 
| 
      
 24 
     | 
    
         
            +
                # end
         
     | 
| 
      
 25 
     | 
    
         
            +
              end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
              def show_view
         
     | 
| 
      
 28 
     | 
    
         
            +
                @view.create.show
         
     | 
| 
      
 29 
     | 
    
         
            +
              end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
              def show_modal_add
         
     | 
| 
      
 32 
     | 
    
         
            +
                controller = StudentInputFormControllerCreate.new(self)
         
     | 
| 
      
 33 
     | 
    
         
            +
                view = StudentInputForm.new(controller)
         
     | 
| 
      
 34 
     | 
    
         
            +
                controller.set_view(view)
         
     | 
| 
      
 35 
     | 
    
         
            +
                view.create.show
         
     | 
| 
      
 36 
     | 
    
         
            +
              end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
              def show_modal_edit(current_page, per_page, selected_row)
         
     | 
| 
      
 39 
     | 
    
         
            +
                student_num = (current_page - 1) * per_page + selected_row
         
     | 
| 
      
 40 
     | 
    
         
            +
                @data_list.select_element(student_num)
         
     | 
| 
      
 41 
     | 
    
         
            +
                student_id = @data_list.selected_id
         
     | 
| 
      
 42 
     | 
    
         
            +
                controller = StudentInputFormControllerEdit.new(self, student_id)
         
     | 
| 
      
 43 
     | 
    
         
            +
                view = StudentInputForm.new(controller)
         
     | 
| 
      
 44 
     | 
    
         
            +
                controller.set_view(view)
         
     | 
| 
      
 45 
     | 
    
         
            +
                view.create.show
         
     | 
| 
      
 46 
     | 
    
         
            +
              end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
              def delete_selected(current_page, per_page, selected_row)
         
     | 
| 
      
 49 
     | 
    
         
            +
                #begin
         
     | 
| 
      
 50 
     | 
    
         
            +
                  student_num = (current_page - 1) * per_page + selected_row
         
     | 
| 
      
 51 
     | 
    
         
            +
                  @data_list.select_element(student_num)
         
     | 
| 
      
 52 
     | 
    
         
            +
                  student_id = @data_list.selected_id
         
     | 
| 
      
 53 
     | 
    
         
            +
                  @student_rep.remove_student(student_id)
         
     | 
| 
      
 54 
     | 
    
         
            +
                # rescue
         
     | 
| 
      
 55 
     | 
    
         
            +
                #   on_db_conn_error
         
     | 
| 
      
 56 
     | 
    
         
            +
                # end
         
     | 
| 
      
 57 
     | 
    
         
            +
              end
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
              def refresh_data(page, per_page)
         
     | 
| 
      
 60 
     | 
    
         
            +
                #begin
         
     | 
| 
      
 61 
     | 
    
         
            +
                  @data_list = @student_rep.paginated_short_students(page, per_page, @data_list)
         
     | 
| 
      
 62 
     | 
    
         
            +
                  @view.update_student_count(@student_rep.student_count)
         
     | 
| 
      
 63 
     | 
    
         
            +
                # rescue
         
     | 
| 
      
 64 
     | 
    
         
            +
                #   on_db_conn_error
         
     | 
| 
      
 65 
     | 
    
         
            +
                # end
         
     | 
| 
      
 66 
     | 
    
         
            +
              end
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
              private
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
              def on_db_conn_error
         
     | 
| 
      
 71 
     | 
    
         
            +
                # api = Win32API.new('user32', 'MessageBox', ['L', 'P', 'P', 'L'], 'I')
         
     | 
| 
      
 72 
     | 
    
         
            +
                # api.call(0, "No connection to DB =)", "Error", 0)
         
     | 
| 
      
 73 
     | 
    
         
            +
                # exit(false)
         
     | 
| 
      
 74 
     | 
    
         
            +
              end
         
     | 
| 
      
 75 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,103 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require 'json'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require_relative 'student_base'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            class Student < StudentBase
         
     | 
| 
      
 7 
     | 
    
         
            +
              # Делаем new предка публичным
         
     | 
| 
      
 8 
     | 
    
         
            +
              public_class_method :new
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              def self.from_hash(hash)
         
     | 
| 
      
 11 
     | 
    
         
            +
                hash = hash.dup
         
     | 
| 
      
 12 
     | 
    
         
            +
                raise ArgumentError, 'Fields required: fist_name, last_name, father_name' unless hash.key?(:first_name) && hash.key?(:last_name) && hash.key?(:father_name)
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                first_name = hash.delete(:first_name)
         
     | 
| 
      
 15 
     | 
    
         
            +
                last_name = hash.delete(:last_name)
         
     | 
| 
      
 16 
     | 
    
         
            +
                father_name = hash.delete(:father_name)
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                Student.new(last_name, first_name, father_name, **hash)
         
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
              # Конструктор из JSON строки
         
     | 
| 
      
 22 
     | 
    
         
            +
              def self.from_json_str(str)
         
     | 
| 
      
 23 
     | 
    
         
            +
                params = JSON.parse(str, { symbolize_names: true })
         
     | 
| 
      
 24 
     | 
    
         
            +
                from_hash(params)
         
     | 
| 
      
 25 
     | 
    
         
            +
              end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
              # Делаем публичными геттеры и сеттеры базового класса
         
     | 
| 
      
 28 
     | 
    
         
            +
              public :phone, :telegram, :email, 'id=', 'phone=', 'telegram=', 'email=', 'git='
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
              # Стандартные геттеры для полей
         
     | 
| 
      
 31 
     | 
    
         
            +
              attr_reader :last_name, :first_name, :father_name
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
              # Стандартный конструктор
         
     | 
| 
      
 34 
     | 
    
         
            +
              def initialize(last_name, first_name, father_name, **options)
         
     | 
| 
      
 35 
     | 
    
         
            +
                self.last_name = last_name
         
     | 
| 
      
 36 
     | 
    
         
            +
                self.first_name = first_name
         
     | 
| 
      
 37 
     | 
    
         
            +
                self.father_name = father_name
         
     | 
| 
      
 38 
     | 
    
         
            +
                super(**options)
         
     | 
| 
      
 39 
     | 
    
         
            +
              end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
              # Сеттеры с валидацией перед присваиванием
         
     | 
| 
      
 42 
     | 
    
         
            +
              def last_name=(new_last_name)
         
     | 
| 
      
 43 
     | 
    
         
            +
                raise ArgumentError, "Invalid argument: last_name=#{new_last_name}" unless Student.valid_name?(new_last_name)
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                @last_name = new_last_name
         
     | 
| 
      
 46 
     | 
    
         
            +
              end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
              def first_name=(new_first_name)
         
     | 
| 
      
 49 
     | 
    
         
            +
                raise ArgumentError, "Invalid argument: first_name=#{new_first_name}" unless Student.valid_name?(new_first_name)
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
                @first_name = new_first_name
         
     | 
| 
      
 52 
     | 
    
         
            +
              end
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
              def father_name=(new_father_name)
         
     | 
| 
      
 55 
     | 
    
         
            +
                raise ArgumentError, "Invalid argument: father_name=#{new_father_name}" unless Student.valid_name?(new_father_name)
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                @father_name = new_father_name
         
     | 
| 
      
 58 
     | 
    
         
            +
              end
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
              # Отдельный сеттер для массовой установки контактов
         
     | 
| 
      
 61 
     | 
    
         
            +
              def set_contacts(phone: nil, telegram: nil, email: nil)
         
     | 
| 
      
 62 
     | 
    
         
            +
                self.phone = phone if phone
         
     | 
| 
      
 63 
     | 
    
         
            +
                self.telegram = telegram if telegram
         
     | 
| 
      
 64 
     | 
    
         
            +
                self.email = email if email
         
     | 
| 
      
 65 
     | 
    
         
            +
              end
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
              # Имя пользователя в формате Фамилия И. О.
         
     | 
| 
      
 68 
     | 
    
         
            +
              def last_name_and_initials
         
     | 
| 
      
 69 
     | 
    
         
            +
                "#{last_name} #{first_name[0]}. #{father_name[0]}."
         
     | 
| 
      
 70 
     | 
    
         
            +
              end
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
              # Краткая информация о пользователе
         
     | 
| 
      
 73 
     | 
    
         
            +
              def short_info
         
     | 
| 
      
 74 
     | 
    
         
            +
                info = {}
         
     | 
| 
      
 75 
     | 
    
         
            +
                info[:last_name_and_initials] = last_name_and_initials
         
     | 
| 
      
 76 
     | 
    
         
            +
                info[:contact] = short_contact
         
     | 
| 
      
 77 
     | 
    
         
            +
                info[:git] = git
         
     | 
| 
      
 78 
     | 
    
         
            +
                JSON.generate(info)
         
     | 
| 
      
 79 
     | 
    
         
            +
              end
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
              # Методы приведения объекта к строке
         
     | 
| 
      
 82 
     | 
    
         
            +
              def to_s
         
     | 
| 
      
 83 
     | 
    
         
            +
                result = "#{last_name} #{first_name} #{father_name}"
         
     | 
| 
      
 84 
     | 
    
         
            +
                %i[id phone telegram email git].each do |attr|
         
     | 
| 
      
 85 
     | 
    
         
            +
                  attr_val = send(attr)
         
     | 
| 
      
 86 
     | 
    
         
            +
                  result += ", #{attr}=#{attr_val}" unless attr_val.nil?
         
     | 
| 
      
 87 
     | 
    
         
            +
                end
         
     | 
| 
      
 88 
     | 
    
         
            +
                result
         
     | 
| 
      
 89 
     | 
    
         
            +
              end
         
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
              def to_hash
         
     | 
| 
      
 92 
     | 
    
         
            +
                attrs = {}
         
     | 
| 
      
 93 
     | 
    
         
            +
                %i[last_name first_name father_name id phone telegram email git].each do |attr|
         
     | 
| 
      
 94 
     | 
    
         
            +
                  attr_val = send(attr)
         
     | 
| 
      
 95 
     | 
    
         
            +
                  attrs[attr] = attr_val unless attr_val.nil?
         
     | 
| 
      
 96 
     | 
    
         
            +
                end
         
     | 
| 
      
 97 
     | 
    
         
            +
                attrs
         
     | 
| 
      
 98 
     | 
    
         
            +
              end
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
              def to_json_str
         
     | 
| 
      
 101 
     | 
    
         
            +
                JSON.generate(to_hash)
         
     | 
| 
      
 102 
     | 
    
         
            +
              end
         
     | 
| 
      
 103 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,100 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            class StudentBase
         
     | 
| 
      
 4 
     | 
    
         
            +
              # Запрещаем создание базового класса (он "абстрактный")
         
     | 
| 
      
 5 
     | 
    
         
            +
              private_class_method :new
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
              # Валидаторы для полей
         
     | 
| 
      
 8 
     | 
    
         
            +
              def self.valid_name?(name)
         
     | 
| 
      
 9 
     | 
    
         
            +
                name.match(/(^[А-Я][а-я]+$)|(^[A-Z][a-z]+$)/)
         
     | 
| 
      
 10 
     | 
    
         
            +
              end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              def self.valid_phone?(phone)
         
     | 
| 
      
 13 
     | 
    
         
            +
                phone.match(/^\+?[78] ?[(-]?\d{3} ?[)-]?[ -]?\d{3}[ -]?\d{2}[ -]?\d{2}$/)
         
     | 
| 
      
 14 
     | 
    
         
            +
              end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              def self.valid_profile_name?(profile_name)
         
     | 
| 
      
 17 
     | 
    
         
            +
                profile_name.match(/^[a-zA-Z0-9_.]+$/)
         
     | 
| 
      
 18 
     | 
    
         
            +
              end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
              def self.valid_email?(email)
         
     | 
| 
      
 21 
     | 
    
         
            +
                email.match(/^(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/)
         
     | 
| 
      
 22 
     | 
    
         
            +
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
              # Стандартные геттеры и сеттеры для полей
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
              protected
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
              attr_writer :id
         
     | 
| 
      
 29 
     | 
    
         
            +
              attr_reader :phone, :telegram, :email
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
              public
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
              attr_reader :id, :git
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
              # Стандартный конструктор
         
     | 
| 
      
 36 
     | 
    
         
            +
              def initialize(id: nil, phone: nil, telegram: nil, email: nil, git: nil)
         
     | 
| 
      
 37 
     | 
    
         
            +
                self.id = id
         
     | 
| 
      
 38 
     | 
    
         
            +
                self.phone = phone
         
     | 
| 
      
 39 
     | 
    
         
            +
                self.telegram = telegram
         
     | 
| 
      
 40 
     | 
    
         
            +
                self.email = email
         
     | 
| 
      
 41 
     | 
    
         
            +
                self.git = git
         
     | 
| 
      
 42 
     | 
    
         
            +
              end
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
              # Краткая информация о первом доступном контакте пользователя
         
     | 
| 
      
 45 
     | 
    
         
            +
              def short_contact
         
     | 
| 
      
 46 
     | 
    
         
            +
                contact = {}
         
     | 
| 
      
 47 
     | 
    
         
            +
                %i[telegram email phone].each do |attr|
         
     | 
| 
      
 48 
     | 
    
         
            +
                  attr_val = send(attr)
         
     | 
| 
      
 49 
     | 
    
         
            +
                  next if attr_val.nil?
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
                  contact[:type] = attr
         
     | 
| 
      
 52 
     | 
    
         
            +
                  contact[:value] = attr_val
         
     | 
| 
      
 53 
     | 
    
         
            +
                  return contact
         
     | 
| 
      
 54 
     | 
    
         
            +
                end
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
                nil
         
     | 
| 
      
 57 
     | 
    
         
            +
              end
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
              protected
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
              # Сеттеры с валидацией перед присваиванием
         
     | 
| 
      
 62 
     | 
    
         
            +
              def phone=(new_phone)
         
     | 
| 
      
 63 
     | 
    
         
            +
                raise ArgumentError, "Invalid argument: phone=#{new_phone}" unless new_phone.nil? || StudentBase.valid_phone?(new_phone)
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
                @phone = new_phone
         
     | 
| 
      
 66 
     | 
    
         
            +
              end
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
              def telegram=(new_telegram)
         
     | 
| 
      
 69 
     | 
    
         
            +
                raise ArgumentError, "Invalid argument: telegram=#{new_telegram}" unless new_telegram.nil? || StudentBase.valid_profile_name?(new_telegram)
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
                @telegram = new_telegram
         
     | 
| 
      
 72 
     | 
    
         
            +
              end
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
              def git=(new_git)
         
     | 
| 
      
 75 
     | 
    
         
            +
                raise ArgumentError, "Invalid argument: git=#{new_git}" unless new_git.nil? || StudentBase.valid_profile_name?(new_git)
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
                @git = new_git
         
     | 
| 
      
 78 
     | 
    
         
            +
              end
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
              def email=(new_email)
         
     | 
| 
      
 81 
     | 
    
         
            +
                raise ArgumentError, "Invalid argument: email=#{new_email}" unless new_email.nil? || StudentBase.valid_email?(new_email)
         
     | 
| 
      
 82 
     | 
    
         
            +
             
     | 
| 
      
 83 
     | 
    
         
            +
                @email = new_email
         
     | 
| 
      
 84 
     | 
    
         
            +
              end
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
              public
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
              # Валидаторы объекта
         
     | 
| 
      
 89 
     | 
    
         
            +
              def has_contacts?
         
     | 
| 
      
 90 
     | 
    
         
            +
                !phone.nil? || !telegram.nil? || !email.nil?
         
     | 
| 
      
 91 
     | 
    
         
            +
              end
         
     | 
| 
      
 92 
     | 
    
         
            +
             
     | 
| 
      
 93 
     | 
    
         
            +
              def has_git?
         
     | 
| 
      
 94 
     | 
    
         
            +
                !git.nil?
         
     | 
| 
      
 95 
     | 
    
         
            +
              end
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
              def valid?
         
     | 
| 
      
 98 
     | 
    
         
            +
                has_contacts? && has_git?
         
     | 
| 
      
 99 
     | 
    
         
            +
              end
         
     | 
| 
      
 100 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,50 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            class StudentShort < StudentBase
         
     | 
| 
      
 4 
     | 
    
         
            +
              # Делаем new предка публичным
         
     | 
| 
      
 5 
     | 
    
         
            +
              public_class_method :new
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
              # Стандартные геттеры и сеттеры
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
              private
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
              attr_writer :last_name_and_initials, :contact
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              public
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              attr_reader :last_name_and_initials, :contact
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              # Конструктор из Student
         
     | 
| 
      
 18 
     | 
    
         
            +
              def self.from_student(student)
         
     | 
| 
      
 19 
     | 
    
         
            +
                raise ArgumentError, 'Student ID is required' if student.id.nil?
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                StudentShort.new(student.id, student.short_info)
         
     | 
| 
      
 22 
     | 
    
         
            +
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
              # Стандартный конструктор
         
     | 
| 
      
 25 
     | 
    
         
            +
              def initialize(id, info_str)
         
     | 
| 
      
 26 
     | 
    
         
            +
                params = JSON.parse(info_str, { symbolize_names: true })
         
     | 
| 
      
 27 
     | 
    
         
            +
                raise ArgumentError, 'Fields required: last_name_and_initials' if !params.key?(:last_name_and_initials) || params[:last_name_and_initials].nil?
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                self.id = id
         
     | 
| 
      
 30 
     | 
    
         
            +
                self.last_name_and_initials = params[:last_name_and_initials]
         
     | 
| 
      
 31 
     | 
    
         
            +
                self.contact = params[:contact]
         
     | 
| 
      
 32 
     | 
    
         
            +
                self.git = params[:git]
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                options = {}
         
     | 
| 
      
 35 
     | 
    
         
            +
                options[:id] = id
         
     | 
| 
      
 36 
     | 
    
         
            +
                options[:git] = git
         
     | 
| 
      
 37 
     | 
    
         
            +
                options[contact[:type].to_sym] = contact[:value] if contact
         
     | 
| 
      
 38 
     | 
    
         
            +
                super(**options)
         
     | 
| 
      
 39 
     | 
    
         
            +
              end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
              # Методы приведения объекта к строке
         
     | 
| 
      
 42 
     | 
    
         
            +
              def to_s
         
     | 
| 
      
 43 
     | 
    
         
            +
                result = last_name_and_initials
         
     | 
| 
      
 44 
     | 
    
         
            +
                %i[id contact git].each do |attr|
         
     | 
| 
      
 45 
     | 
    
         
            +
                  attr_val = send(attr)
         
     | 
| 
      
 46 
     | 
    
         
            +
                  result += ", #{attr}=#{attr_val}" unless attr_val.nil?
         
     | 
| 
      
 47 
     | 
    
         
            +
                end
         
     | 
| 
      
 48 
     | 
    
         
            +
                result
         
     | 
| 
      
 49 
     | 
    
         
            +
              end
         
     | 
| 
      
 50 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,64 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: rubbish_code
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.0
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Jake Epps
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire:
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2023-05-05 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 13 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 14 
     | 
    
         
            +
              name: win32api
         
     | 
| 
      
 15 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 16 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 17 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 18 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 20 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 21 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 22 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 23 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 24 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 27 
     | 
    
         
            +
            description: А gem that allows you to get pass for patterns
         
     | 
| 
      
 28 
     | 
    
         
            +
            email: nullexp.team@gmail.com
         
     | 
| 
      
 29 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 30 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 31 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 32 
     | 
    
         
            +
            files:
         
     | 
| 
      
 33 
     | 
    
         
            +
            - LICENSE.txt
         
     | 
| 
      
 34 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 35 
     | 
    
         
            +
            - lib/controllers/student_input_form/student_input_form_controller_create.rb
         
     | 
| 
      
 36 
     | 
    
         
            +
            - lib/controllers/student_input_form/student_input_form_controller_edit.rb
         
     | 
| 
      
 37 
     | 
    
         
            +
            - lib/controllers/tab_students_controller.rb
         
     | 
| 
      
 38 
     | 
    
         
            +
            - lib/models/student.rb
         
     | 
| 
      
 39 
     | 
    
         
            +
            - lib/models/student_base.rb
         
     | 
| 
      
 40 
     | 
    
         
            +
            - lib/models/student_short.rb
         
     | 
| 
      
 41 
     | 
    
         
            +
            homepage: https://github.com/Jakepps/Ruby_Moment
         
     | 
| 
      
 42 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 43 
     | 
    
         
            +
            - MIT
         
     | 
| 
      
 44 
     | 
    
         
            +
            metadata: {}
         
     | 
| 
      
 45 
     | 
    
         
            +
            post_install_message:
         
     | 
| 
      
 46 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 47 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 48 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 49 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 50 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 51 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 52 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 53 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 54 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 55 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 56 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 57 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 58 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 59 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 60 
     | 
    
         
            +
            rubygems_version: 3.4.10
         
     | 
| 
      
 61 
     | 
    
         
            +
            signing_key:
         
     | 
| 
      
 62 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 63 
     | 
    
         
            +
            summary: Student App
         
     | 
| 
      
 64 
     | 
    
         
            +
            test_files: []
         
     |