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.


58
59
60
# File 'app/api/core/endpoint/basic_handler/paged.rb', line 58

def initialize(model)
  @model = model
end

Instance Method Details

#paginate(options) ⇒ Object


81
82
83
# File 'app/api/core/endpoint/basic_handler/paged.rb', line 81

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