Class: StatelyDB::SyncResult

Inherits:
Object
  • Object
show all
Defined in:
lib/statelydb.rb

Overview

SyncResult represents the results of a sync operation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(changed_items:, deleted_item_paths:, is_reset:, token:) ⇒ SyncResult

Returns a new instance of SyncResult.

Parameters:

  • changed_items (Array<StatelyDB::Item>)

    the items that were changed

  • deleted_item_paths (Array<String>)

    the key paths that were deleted

  • is_reset (Boolean)

    whether the sync operation reset the token

  • token (StatelyDB::Token)

    the token to continue from



348
349
350
351
352
353
# File 'lib/statelydb.rb', line 348

def initialize(changed_items:, deleted_item_paths:, is_reset:, token:)
  @changed_items = changed_items
  @deleted_item_paths = deleted_item_paths
  @is_reset = is_reset
  @token = token
end

Instance Attribute Details

#changed_itemsArray<StatelyDB::Item> (readonly)

the items that were changed

Returns:



341
342
343
# File 'lib/statelydb.rb', line 341

def changed_items
  @changed_items
end

#deleted_item_pathsArray<String> (readonly)

the key paths that were deleted

Returns:

  • (Array<String>)

    the current value of deleted_item_paths



341
342
343
# File 'lib/statelydb.rb', line 341

def deleted_item_paths
  @deleted_item_paths
end

#is_resetBoolean (readonly)

whether the sync operation reset the token

Returns:

  • (Boolean)

    the current value of is_reset



341
342
343
# File 'lib/statelydb.rb', line 341

def is_reset
  @is_reset
end

#tokenStatelyDB::Token (readonly)

the token to continue from

Returns:



341
342
343
# File 'lib/statelydb.rb', line 341

def token
  @token
end