Class: Core::Endpoint::BasicHandler::Paged::PagedTarget

Inherits:
Object
  • Object
show all
Defined in:
app/api/core/endpoint/basic_handler/paged.rb

Overview

rubocop:todo Style/Documentation

Defined Under Namespace

Classes: PageOfResults

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ PagedTarget

Returns a new instance of PagedTarget.


61
62
63
# File 'app/api/core/endpoint/basic_handler/paged.rb', line 61

def initialize(model)
  @model = model
end

Instance Method Details

#paginate(options) ⇒ Object


84
85
86
# File 'app/api/core/endpoint/basic_handler/paged.rb', line 84

def paginate(options)
  PageOfResults.new(options[:page], options[:total_entries], options[:per_page])
end