class Qyu::Helpers::Pagination::PaginatableArray
Attributes
limit[RW]
offset[RW]
page[RW]
total_count[RW]
Public Class Methods
new(collection, limit:, offset:, total_count:, page:)
click to toggle source
Calls superclass method
# File lib/qyu/ui/helpers/pagination.rb, line 10 def initialize(collection, limit:, offset:, total_count:, page:) @limit = limit @offset = offset @total_count = total_count @page = page super(collection) end
Public Instance Methods
total_pages()
click to toggle source
# File lib/qyu/ui/helpers/pagination.rb, line 18 def total_pages @total_pages ||= total_count / limit end