Module: Pragma::Decorator::Pagination::InstanceMethods
- Defined in:
- lib/pragma/decorator/pagination.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#current_page ⇒ Integer
Returns the current page of the collection.
-
#next_page ⇒ Integer|NilClass
Returns the next page of the collection.
-
#per_page ⇒ Integer
Returns the number of items per page in the collection.
-
#previous_page ⇒ Integer|NilClass
Returns the previous page of the collection.
-
#total_entries ⇒ Integer
Returns the total number of items in the collection.
-
#total_pages ⇒ Integer
Returns the total number of pages in the collection.
Instance Method Details
#current_page ⇒ Integer
Returns the current page of the collection.
39 40 41 |
# File 'lib/pragma/decorator/pagination.rb', line 39 def current_page adapter.current_page end |
#next_page ⇒ Integer|NilClass
Returns the next page of the collection.
48 49 50 |
# File 'lib/pragma/decorator/pagination.rb', line 48 def next_page adapter.next_page end |
#per_page ⇒ Integer
Returns the number of items per page in the collection.
57 58 59 |
# File 'lib/pragma/decorator/pagination.rb', line 57 def per_page adapter.per_page end |
#previous_page ⇒ Integer|NilClass
Returns the previous page of the collection.
66 67 68 |
# File 'lib/pragma/decorator/pagination.rb', line 66 def previous_page adapter.previous_page end |
#total_entries ⇒ Integer
Returns the total number of items in the collection.
75 76 77 |
# File 'lib/pragma/decorator/pagination.rb', line 75 def total_entries adapter.total_entries end |
#total_pages ⇒ Integer
Returns the total number of pages in the collection.
84 85 86 |
# File 'lib/pragma/decorator/pagination.rb', line 84 def total_pages adapter.total_pages end |