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

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

Defined Under Namespace

Classes: PageOfResults

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ PagedTarget


56
57
58
# File 'app/api/core/endpoint/basic_handler/paged.rb', line 56

def initialize(model)
  @model = model
end

Instance Method Details

#paginate(options) ⇒ Object


79
80
81
# File 'app/api/core/endpoint/basic_handler/paged.rb', line 79

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