Class: StatelyDB::Token
- Inherits:
-
Object
- Object
- StatelyDB::Token
- Defined in:
- lib/token.rb
Overview
The Token type contains a continuation token for list and sync operations along with metadata about the ability to sync or continue listing based on the last operation performed.
Ths StatelyDB SDK vends this Token type for list and sync operations. Consumers should not need to construct this type directly.
Instance Method Summary collapse
-
#can_continue? ⇒ Boolean
Returns true if the list operation can be continued, otherwise false.
-
#can_sync? ⇒ Boolean
Returns true if the sync operation can be continued, otherwise false.
-
#initialize(token_data:, can_continue:, can_sync:) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(token_data:, can_continue:, can_sync:) ⇒ Token
Returns a new instance of Token.
16 17 18 19 20 |
# File 'lib/token.rb', line 16 def initialize(token_data:, can_continue:, can_sync:) @token_data = token_data @can_continue = can_continue @can_sync = can_sync end |
Instance Method Details
#can_continue? ⇒ Boolean
Returns true if the list operation can be continued, otherwise false.
24 25 26 |
# File 'lib/token.rb', line 24 def can_continue? !!@can_continue end |
#can_sync? ⇒ Boolean
Returns true if the sync operation can be continued, otherwise false.
30 31 32 |
# File 'lib/token.rb', line 30 def can_sync? !!@can_sync end |