Sha256: 471db782a93490d81c90eb3cad2c551e1be5337077d237d9f059579e3687df84
Contents?: true
Size: 399 Bytes
Versions: 2
Compression:
Stored size: 399 Bytes
Contents
class Quaderno::Collection < Array include Quaderno::Helpers::RateLimit def current_page=(page_number) @page = page_number end def current_page @page.to_i || 1 end def total_pages=(total_pages) @total_pages = total_pages end def total_pages @total_pages.to_i || 1 end def pagination_info { current_page: current_page, total_pages: total_pages } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
quaderno-1.17.1 | lib/quaderno-ruby/collection.rb |
quaderno-1.17.0 | lib/quaderno-ruby/collection.rb |