Class: StudentsListDBAdapter
- Inherits:
-
StudentsListAdapter
- Object
- StudentsListAdapter
- StudentsListDBAdapter
- Defined in:
- lib/source/student_list_adapter.rb
Instance Method Summary collapse
- #add_student(student) ⇒ Object
- #count ⇒ Object
- #get_student(id) ⇒ Object
- #get_students_pag(from, to, data) ⇒ Object
-
#initialize(database_list) ⇒ StudentsListDBAdapter
constructor
A new instance of StudentsListDBAdapter.
- #remove_student(id) ⇒ Object
- #replace_student(id, student) ⇒ Object
Constructor Details
#initialize(database_list) ⇒ StudentsListDBAdapter
Returns a new instance of StudentsListDBAdapter.
31 32 33 |
# File 'lib/source/student_list_adapter.rb', line 31 def initialize(database_list) self.database_list = database_list end |
Instance Method Details
#add_student(student) ⇒ Object
51 52 53 |
# File 'lib/source/student_list_adapter.rb', line 51 def add_student(student) database_list.add_student(student) end |
#count ⇒ Object
55 56 57 |
# File 'lib/source/student_list_adapter.rb', line 55 def count database_list.count end |
#get_student(id) ⇒ Object
35 36 37 |
# File 'lib/source/student_list_adapter.rb', line 35 def get_student(id) database_list.get_student(id) end |
#get_students_pag(from, to, data) ⇒ Object
47 48 49 |
# File 'lib/source/student_list_adapter.rb', line 47 def get_students_pag(from, to, data) database_list.get_students_pag(from, to, data) end |
#remove_student(id) ⇒ Object
39 40 41 |
# File 'lib/source/student_list_adapter.rb', line 39 def remove_student(id) database_list.remove_student(id) end |
#replace_student(id, student) ⇒ Object
43 44 45 |
# File 'lib/source/student_list_adapter.rb', line 43 def replace_student(id, student) database_list.replace_student(id, student) end |