Class: Couchbase::MutationState
- Inherits:
-
Object
- Object
- Couchbase::MutationState
- Defined in:
- lib/couchbase/mutation_state.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/mutation_state.rb more...
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#add(*mutation_tokens) ⇒ Object
Add one or more Mutation tokens to this state.
-
#initialize(*mutation_tokens) ⇒ MutationState
constructor
Create a mutation state from one or more MutationTokens.
Constructor Details
#initialize(*mutation_tokens) ⇒ MutationState
Create a mutation state from one or more MutationTokens
39 40 41 42 |
# File 'lib/couchbase/mutation_state.rb', line 39 def initialize(*mutation_tokens) @tokens = [] add(*mutation_tokens) end |
Instance Attribute Details
#tokens ⇒ Array<MutationToken>
34 35 36 |
# File 'lib/couchbase/mutation_state.rb', line 34 def tokens @tokens end |
Instance Method Details
#add(*mutation_tokens) ⇒ Object
Add one or more Mutation tokens to this state
47 48 49 |
# File 'lib/couchbase/mutation_state.rb', line 47 def add(*mutation_tokens) @tokens |= mutation_tokens end |