Class: Couchbase::Collection::MutateInResult
- Inherits:
-
MutationResult
- Object
- MutationResult
- Couchbase::Collection::MutateInResult
- Defined in:
- lib/couchbase/collection_options.rb
Instance Attribute Summary collapse
-
#transcoder ⇒ JsonTranscoder
The default transcoder which should be used.
Attributes inherited from MutationResult
Instance Method Summary collapse
-
#content(index, transcoder = self.transcoder) ⇒ Object
Decodes the content at the given index.
-
#initialize {|self| ... } ⇒ MutateInResult
constructor
A new instance of MutateInResult.
Constructor Details
#initialize {|self| ... } ⇒ MutateInResult
Returns a new instance of MutateInResult.
385 386 387 |
# File 'lib/couchbase/collection_options.rb', line 385 def initialize yield self if block_given? end |
Instance Attribute Details
#transcoder ⇒ JsonTranscoder
Returns The default transcoder which should be used.
408 409 410 |
# File 'lib/couchbase/collection_options.rb', line 408 def transcoder @transcoder end |
Instance Method Details
#content(index, transcoder = self.transcoder) ⇒ Object
Decodes the content at the given index
375 376 377 378 379 380 381 382 |
# File 'lib/couchbase/collection_options.rb', line 375 def content(index, transcoder = self.transcoder) field = get_field_at_index(index) if field.type == :counter field.value else transcoder.decode(field.value, :json) end end |