Class: ShnaiderCode::DataListStudentShort
- Inherits:
-
DataList
- Object
- DataList
- ShnaiderCode::DataListStudentShort
show all
- Defined in:
- lib/source/data_list_student_short.rb
Instance Attribute Summary
Attributes inherited from DataList
#list
#data_list_observers
Instance Method Summary
collapse
Methods inherited from DataList
#add_observer, #get_selected_objects, #notify, #remove_observer, #select
#notify
Constructor Details
Returns a new instance of DataListStudentShort.
9
10
11
12
13
|
# File 'lib/source/data_list_student_short.rb', line 9
def initialize(list:, data_constructor:)
self.data_constructor = data_constructor
super(list: list)
end
|
Instance Method Details
#get_data ⇒ Object
19
20
21
|
# File 'lib/source/data_list_student_short.rb', line 19
def get_data
self.data_constructor.execute(list, get_names)
end
|
#get_names ⇒ Object
15
16
17
|
# File 'lib/source/data_list_student_short.rb', line 15
def get_names
["ID", "Фамилия", "Имя", "Отчество", "Гит", "Телега", "Телефон", "Почта"]
end
|
#list=(new_list) ⇒ Object
23
24
25
26
|
# File 'lib/source/data_list_student_short.rb', line 23
def list=(new_list)
@list = new_list
notify()
end
|