class RsPaginator::Collection
Attributes
page[R]
per_page[R]
total[R]
Public Class Methods
new(objects, page, per_page, total)
click to toggle source
Calls superclass method
# File lib/rs_paginator/collection.rb, line 9 def initialize(objects, page, per_page, total) @objects = objects @page = page.to_i @per_page = per_page.to_i @total = total.to_i super(objects) end
Public Instance Methods
total_pages()
click to toggle source
# File lib/rs_paginator/collection.rb, line 17 def total_pages (@total.to_f / @per_page).ceil end