Sha256: 0cd86455c9d54362e39760598589ebd5dbe0370c7f0a23e2e1bbc2d3403693b5

Contents?: true

Size: 502 Bytes

Versions: 7

Compression:

Stored size: 502 Bytes

Contents

class RESTFramework::Paginators::BasePaginator
  def initialize(data:, controller:, **kwargs)
    @data = data
    @controller = controller
  end

  # Get the page and return it so the caller can serialize it.
  def get_page
    raise NotImplementedError
  end

  # Wrap the serialized page with appropriate metadata.
  def get_paginated_response(serialized_page)
    raise NotImplementedError
  end
end

# Alias for convenience.
RESTFramework::BasePaginator = RESTFramework::Paginators::BasePaginator

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rest_framework-0.9.14 lib/rest_framework/paginators/base_paginator.rb
rest_framework-0.9.12.pre.1.pre.g39306cb lib/rest_framework/paginators/base_paginator.rb
rest_framework-0.9.11.pre.40.pre.g5dcad32 lib/rest_framework/paginators/base_paginator.rb
rest_framework-0.9.11 lib/rest_framework/paginators/base_paginator.rb
rest_framework-0.9.10 lib/rest_framework/paginators/base_paginator.rb
rest_framework-0.9.9 lib/rest_framework/paginators/base_paginator.rb
rest_framework-0.9.8 lib/rest_framework/paginators/base_paginator.rb