Class: Contentful::Array
- Inherits:
-
Object
- Object
- Contentful::Array
- Includes:
- Resource, Resource::ArrayLike, Resource::SystemProperties
- Defined in:
- lib/contentful/array.rb
Overview
Note:
It also provides an #each method and includes Ruby’s Enumerable module (gives you methods like #min, #first, etc)
Resource Class for Arrays (e.g. search results)
Instance Attribute Summary
Attributes included from Resource::SystemProperties
Attributes included from Resource
#client, #default_locale, #properties, #raw, #request
Instance Method Summary collapse
-
#next_page ⇒ Contentful::Array, false
Simplifies pagination.
Methods included from Resource::ArrayLike
#array?, #each_item, #empty?, #size
Methods included from Resource
#array?, #fields, #localized?, #reload, #sys
Instance Method Details
#next_page ⇒ Contentful::Array, false
Simplifies pagination
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/contentful/array.rb', line 24 def next_page if request new_skip = (skip || 0) + (limit || DEFAULT_LIMIT) new_request = request.copy new_request.query[:skip] = new_skip new_request.get else false end end |