Class: Contentful::SyncPage
- Inherits:
-
Object
- Object
- Contentful::SyncPage
- Includes:
- Resource, Resource::ArrayLike, Resource::SystemProperties
- Defined in:
- lib/contentful/sync_page.rb
Overview
Wrapper Class for Sync results
Instance Attribute Summary collapse
-
#sync ⇒ Object
readonly
Returns the value of attribute sync.
Attributes included from Resource::SystemProperties
Attributes included from Resource
#client, #default_locale, #properties, #raw, #request
Instance Method Summary collapse
-
#last_page? ⇒ Boolean
Returns wether it is the last sync page.
-
#next_page ⇒ Contentful::SyncPage, void
Requests next sync page from API.
-
#next_page? ⇒ Boolean
Returns wether there is a next sync page.
Methods included from Resource::ArrayLike
#array?, #each_item, #empty?, #size
Methods included from Resource
#array?, #entry?, #fields, #reload, #sys
Instance Attribute Details
#sync ⇒ Object (readonly)
Returns the value of attribute sync
7 8 9 |
# File 'lib/contentful/sync_page.rb', line 7 def sync @sync end |
Instance Method Details
#last_page? ⇒ Boolean
Returns wether it is the last sync page
36 37 38 |
# File 'lib/contentful/sync_page.rb', line 36 def last_page? !next_page_url end |
#next_page ⇒ Contentful::SyncPage, void
Requests next sync page from API
20 21 22 |
# File 'lib/contentful/sync_page.rb', line 20 def next_page sync.get(next_page_url) if next_page? end |
#next_page? ⇒ Boolean
Returns wether there is a next sync page
27 28 29 30 31 |
# File 'lib/contentful/sync_page.rb', line 27 def next_page? # rubocop:disable Style/DoubleNegation !!next_page_url # rubocop:enable Style/DoubleNegation end |