Class: Couchbase::MutationState

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/mutation_state.rb,
/code/couchbase-ruby-client/lib/couchbase/mutation_state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*mutation_tokens) ⇒ MutationState

Create a mutation state from one or more MutationTokens

Parameters:



41
42
43
44
# File 'lib/couchbase/mutation_state.rb', line 41

def initialize(*mutation_tokens)
  @tokens = []
  add(*mutation_tokens)
end

Instance Attribute Details

#tokensArray<MutationToken>

Returns:



36
37
38
# File 'lib/couchbase/mutation_state.rb', line 36

def tokens
  @tokens
end

Instance Method Details

#add(*mutation_tokens) ⇒ Object

Add one or more Mutation tokens to this state

Parameters:



49
50
51
# File 'lib/couchbase/mutation_state.rb', line 49

def add(*mutation_tokens)
  @tokens |= mutation_tokens
end