class RESTFramework::BasePaginator

Public Class Methods

new(data:, controller:, **kwargs) click to toggle source
# File lib/rest_framework/paginators.rb, line 2
def initialize(data:, controller:, **kwargs)
  @data = data
  @controller = controller
end

Public Instance Methods

get_page() click to toggle source

Get the page and return it so the caller can serialize it.

# File lib/rest_framework/paginators.rb, line 8
def get_page
  raise NotImplementedError
end
get_paginated_response(serialized_page) click to toggle source

Wrap the serialized page with appropriate metadata.

# File lib/rest_framework/paginators.rb, line 13
def get_paginated_response(serialized_page)
  raise NotImplementedError
end