Class: TranslationCms::Api::Paginator
- Inherits:
-
JsonApiClient::Paginating::Paginator
- Object
- JsonApiClient::Paginating::Paginator
- TranslationCms::Api::Paginator
- Extended by:
- EnumField::EnumeratedAttribute
- Defined in:
- lib/translation_cms/api/paginator.rb
Instance Method Summary collapse
- #current_page ⇒ Object
- #next_page ⇒ Object
- #previous_page ⇒ Object
- #total_count ⇒ Object (also: #total_entries)
- #total_pages ⇒ Object
Instance Method Details
#current_page ⇒ Object
17 18 19 |
# File 'lib/translation_cms/api/paginator.rb', line 17 def current_page @result_set..current_page end |
#next_page ⇒ Object
25 26 27 |
# File 'lib/translation_cms/api/paginator.rb', line 25 def next_page @result_set..next_page || total_pages end |
#previous_page ⇒ Object
21 22 23 |
# File 'lib/translation_cms/api/paginator.rb', line 21 def previous_page @result_set..prev_page || 1 end |
#total_count ⇒ Object Also known as: total_entries
12 13 14 |
# File 'lib/translation_cms/api/paginator.rb', line 12 def total_count @result_set..total_count end |
#total_pages ⇒ Object
8 9 10 |
# File 'lib/translation_cms/api/paginator.rb', line 8 def total_pages @result_set..total_pages end |