Sha256: 24a51a9673f6729144502b0935456cc32c25b73f35c953b57591f2744a0932ab

Contents?: true

Size: 862 Bytes

Versions: 12

Compression:

Stored size: 862 Bytes

Contents

# frozen_string_literal: true

class StudentRepository
  def initialize(data_source_adapter)
    @data_source_adapter = data_source_adapter
  end

  def student_by_id(student_id)
    @data_source_adapter.student_by_id(student_id)
  end

  # Получить page по счету count элементов (страница начинается с 1)
  def paginated_short_students(page, count, existing_data_list = nil)
    @data_source_adapter.paginated_short_students(page, count, existing_data_list)
  end

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

  def replace_student(student_id, student)
    @data_source_adapter.replace_student(student_id, student)
  end

  def remove_student(student_id)
    @data_source_adapter.remove_student(student_id)
  end

  def student_count
    @data_source_adapter.student_count
  end
end

Version data entries

12 entries across 12 versions & 5 rubygems

Version Path
shnaider_carproj-0.1.0 lib/repositories/student_repository.rb
rybish_code-1.1.4 lib/source/repositories/student_repository.rb
shnaider_code-1.1.6 lib/source/repositories/student_repository.rb
papaSquidLib-0.1.0 lib/repositories/student_repository.rb
rubbish_code-1.1.4 lib/source/repositories/student_repository.rb
rubbish_code-1.1.3 lib/source/repositories/student_repository.rb
rubbish_code-1.1.2 lib/source/repositories/student_repository.rb
rubbish_code-1.1.1 lib/source/repositories/student_repository.rb
rubbish_code-1.1.0 lib/source/repositories/student_repository.rb
rubbish_code-1.0.0 lib/source/repositories/student_repository.rb
rubbish_code-0.1.4 lib/source/repositories/student_repository.rb
rubbish_code-0.1.3 repositories/student_repository.rb