Class: Contentstack::SyncResult
- Inherits:
-
Object
- Object
- Contentstack::SyncResult
- Defined in:
- lib/contentstack/sync_result.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#pagination_token ⇒ Object
readonly
Returns the value of attribute pagination_token.
-
#skip ⇒ Object
readonly
Returns the value of attribute skip.
-
#sync_token ⇒ Object
readonly
Returns the value of attribute sync_token.
-
#total_count ⇒ Object
readonly
Returns the value of attribute total_count.
Instance Method Summary collapse
-
#initialize(sync_result) ⇒ SyncResult
constructor
A new instance of SyncResult.
Constructor Details
#initialize(sync_result) ⇒ SyncResult
Returns a new instance of SyncResult.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/contentstack/sync_result.rb', line 12 def initialize(sync_result) if sync_result.nil? @items = [] @sync_token = nil @pagination_token = nil @total_count = 0 @skip = 0 @limit = 100 else @items = sync_result["items"] || [] @sync_token = sync_result["sync_token"] || nil @pagination_token = sync_result["pagination_token"] || nil @total_count = sync_result["total_count"] || 0 @skip = sync_result["skip"] || 0 @limit = sync_result["limit"] || 100 end end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
5 6 7 |
# File 'lib/contentstack/sync_result.rb', line 5 def items @items end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
10 11 12 |
# File 'lib/contentstack/sync_result.rb', line 10 def limit @limit end |
#pagination_token ⇒ Object (readonly)
Returns the value of attribute pagination_token.
7 8 9 |
# File 'lib/contentstack/sync_result.rb', line 7 def pagination_token @pagination_token end |
#skip ⇒ Object (readonly)
Returns the value of attribute skip.
9 10 11 |
# File 'lib/contentstack/sync_result.rb', line 9 def skip @skip end |
#sync_token ⇒ Object (readonly)
Returns the value of attribute sync_token.
6 7 8 |
# File 'lib/contentstack/sync_result.rb', line 6 def sync_token @sync_token end |
#total_count ⇒ Object (readonly)
Returns the value of attribute total_count.
8 9 10 |
# File 'lib/contentstack/sync_result.rb', line 8 def total_count @total_count end |