Class: StudentList

Inherits:
Object
  • Object
show all
Defined in:
lib/source/studentList.rb

Instance Method Summary collapse

Constructor Details

#initialize(adapter) ⇒ StudentList

Returns a new instance of StudentList.



2
3
4
# File 'lib/source/studentList.rb', line 2

def initialize(adapter)
  @adapter = adapter
end

Instance Method Details

#add_student(student) ⇒ Object



10
11
12
# File 'lib/source/studentList.rb', line 10

def add_student(student)
  @adapter.add_student(student)
end

#count_student ⇒ Object



22
23
24
# File 'lib/source/studentList.rb', line 22

def count_student
  @adapter.count_student
end

#delete_student(id_student) ⇒ Object



14
15
16
# File 'lib/source/studentList.rb', line 14

def delete_student(id_student)
  @adapter.delete_student(id_student)
end

#get_k_n_student_short_list(k, n, data_list) ⇒ Object



26
27
28
# File 'lib/source/studentList.rb', line 26

def get_k_n_student_short_list(k,n, data_list)
  @adapter.get_k_n_student_short_list(k,n, data_list)
end

#replace_student(id_student, student) ⇒ Object



18
19
20
# File 'lib/source/studentList.rb', line 18

def replace_student(id_student, student)
  @adapter.replace_student(id_student, student)
end

#student_by_id(id_student) ⇒ Object



6
7
8
# File 'lib/source/studentList.rb', line 6

def student_by_id(id_student)
  @adapter.student_by_id(id_student)
end