Module: RatingChgkV2::Concerns::Paginated
- Defined in:
- lib/rating_chgk_v2/concerns/paginated.rb
Instance Method Summary collapse
Instance Method Details
#next_page! ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/rating_chgk_v2/concerns/paginated.rb', line 6 def next_page! page_num = current_page + 1 params = endpoint.params.merge({page: page_num}) endpoint.reinitialize new_params: params setup endpoint.do_get, endpoint self end |
#prev_page! ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/rating_chgk_v2/concerns/paginated.rb', line 14 def prev_page! return if current_page <= 1 page_num = current_page - 1 params = endpoint.params.merge({page: page_num}) endpoint.reinitialize new_params: params setup endpoint.do_get, endpoint self end |