rubbish_code 0.1.0 → 0.1.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +29 -29
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4b21965f0130ca61a48365f3da378ad726bf29a211ee6d2327cc825e0eb8449
4
- data.tar.gz: b19d9d9517f6a90fa30f7ac0e0426e71d34a0a3d80e29e59e1105f439884fb70
3
+ metadata.gz: d740f9c6240c70d88d6c8871c16c2d741f84d68195082042e5a7c35251904f56
4
+ data.tar.gz: bf470d916acc2f7c9492ef2d0c635c8a521ed474b203dd41f855ec5c508bca71
5
5
  SHA512:
6
- metadata.gz: eb08de61aa853a490678f922b6ef29ccbf30af3e00f3f9cd3a50ab98db4feae77b0a2f99f5301601712dd7f13112d1b9fb5c1fe6b6abf50148c8d006c435c8ee
7
- data.tar.gz: b6e3c9963cc335cb5b957c7fbda8ce9e80d639b6021016b607a1a179131a2dfc5732217d1818879f24f7e41477846db7e5c573f5d2fa1923110bb8e34a2b39ab
6
+ metadata.gz: b3de6e75f75aedbba00944a4e0260a9646f06487ee8225b57b74d0701288243c20ab2b36541024ed978486f8f02ce8ebc67f858aea38faf411fe3f5e841142ee
7
+ data.tar.gz: bbba813b161d589bbde9ef024e63820c04cd7fa8bc36ca317acd54221d26bd3721163be032d3ed9b3fbd0cc73c5c5160c5142feab1da44c63a3d58d16382c092
data/LICENSE.txt CHANGED
@@ -2,36 +2,36 @@ MIT License
2
2
 
3
3
  Copyright (c) 2023 NullExp
4
4
 
5
- Класс TabStudentsController представляет собой контроллер для работы с интерфейсом взаимодействия с объектами типа Student.
5
+ The TabStudentsController class is a controller for working with the interface for interacting with objects of the Student type.
6
6
 
7
- Методы класса:
7
+ Methods of the class:
8
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 представления.
9
+ 1. initialize(view) - constructor of the class, takes a view object and creates an empty object of the type
10
+ DataListStudentShort, which is assigned the add_listener method with the view argument, as a result of which the view
11
+ is set as a listener for data state change events (data_list).
12
+ 2. on_view_created is a method that initializes an object of the StudentRepository type, which is used for interaction
13
+ with the database, and if an error occurs connecting to the database displays a dialog box with an error message.
14
+ 3. show_view is a method that displays the main application window.
15
+ 4. show_modal_add is a method that displays a modal window for creating a new student record.
16
+ Creates an instance of the StudentInputFormControllerCreate controller and passes it a reference to the current controller,
17
+ creates an object of the StudentInputForm type and passes it a reference to the controller. Then it displays the modal window.
18
+ 5. show_modal_edit(current_page, per_page, selected_row) is a method that displays the modal window for
19
+ editing a student record. Takes the values of the current page (current_page), the number of records on the page
20
+ (per_page) and the selected row (selected_row). Calculates the number of the selected student and selects his id from
21
+ the DataListStudentShort object, then passes it to the StudentInputFormControllerEdit controller, creates an object of the type
22
+ StudentInputForm and passes it a link to the controller. After that, it displays a modal window.
23
+ 6. delete_selected(current_page, per_page, selected_row) is a method that deletes the selected student record.
24
+ Takes the values of the current page (current_page), the number of records on the page (per_page)
25
+ and the selected row (selected_row). Calculates the number of the selected student and selects his id from the DataListStudentShort object,
26
+ then deletes the record using the remove_student method from the StudentRepository object.
27
+ 7. refresh_data(page, per_page) is a method that updates the data in the list of students. Takes the values
28
+ of the current page (page) and the number of entries on the page (per_page).
29
+ Calls a method of the StudentRepository paginated_short_students type to get data in the DataListStudentShort object format.
30
+ Updates information about the number of students using the update_student_count method of the view.
31
31
 
32
- Контроллер Student_Input_Form_Controller_Edit и Student_Input_Form_Controller_Create представляют собой формы
33
- для изменения и создания студентов в базу данных, соотвественно.
32
+ The Student_Input_Form_Controller_Edit controller and Student_Input_Form_Controller_Create are forms
33
+ for modifying and creating students into the database, respectively.
34
34
 
35
- Модели student, student_base и student_short представляет собой модель студента с различными полями и методами
36
- для установки, получения и обработки информации. Student_base - супер класс,
37
- а student_short - короктая информация о студенте.
35
+ The student, student_base and student_short models are a student model with various fields and methods
36
+ for setting, receiving and processing information. Student_base - super class,
37
+ and student_short is the short information about the student.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubbish_code
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Epps