Class: Contentful::SyncPage

Inherits:
Object
  • Object
show all
Includes:
Resource, Resource::ArrayLike, Resource::SystemProperties
Defined in:
lib/contentful/sync_page.rb

Constant Summary

Constants included from Resource::SystemProperties

Resource::SystemProperties::SYS_COERCIONS

Constants included from Resource

Resource::COERCIONS

Instance Attribute Summary collapse

Attributes included from Resource::SystemProperties

#sys

Attributes included from Resource

#client, #default_locale, #properties, #request

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Resource::ArrayLike

#array?, #each_item, #empty?, #size

Methods included from Resource::SystemProperties

included, #initialize, #inspect

Methods included from Resource

#array?, #fields, #initialize, #inspect, #nested_locale_fields?, #reload, #sys

Instance Attribute Details

#syncObject (readonly)

Returns the value of attribute sync.



6
7
8
# File 'lib/contentful/sync_page.rb', line 6

def sync
  @sync
end

Class Method Details

.nested_locale_fields?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/contentful/sync_page.rb', line 16

def self.nested_locale_fields?
  true
end

Instance Method Details

#last_page?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/contentful/sync_page.rb', line 28

def last_page?
  !next_page_url
end

#next_pageObject



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:

  • (Boolean)


24
25
26
# File 'lib/contentful/sync_page.rb', line 24

def next_page?
  !!next_page_url
end