Class: Couchbase::Collection::MutateInResult
- Inherits:
-
MutationResult
- Object
- MutationResult
- Couchbase::Collection::MutateInResult
- Defined in:
- lib/couchbase/collection_options.rb,
/code/couchbase-ruby-client/lib/couchbase/collection_options.rb
Instance Attribute Summary collapse
-
#transcoder ⇒ JsonTranscoder
The default transcoder which should be used.
Attributes inherited from MutationResult
#cas, #error, #id, #mutation_token
Instance Method Summary collapse
-
#content(path_or_index, transcoder = self.transcoder) ⇒ Object
Decodes the content at the given index.
-
#initialize {|self| ... } ⇒ MutateInResult
constructor
A new instance of MutateInResult.
Methods inherited from MutationResult
Constructor Details
#initialize {|self| ... } ⇒ MutateInResult
Returns a new instance of MutateInResult.
262 263 264 265 |
# File 'lib/couchbase/collection_options.rb', line 262 def initialize super yield self if block_given? end |
Instance Attribute Details
#transcoder ⇒ JsonTranscoder
Returns The default transcoder which should be used.
272 273 274 |
# File 'lib/couchbase/collection_options.rb', line 272 def transcoder @transcoder end |
Instance Method Details
#content(path_or_index, transcoder = self.transcoder) ⇒ Object
Decodes the content at the given index
256 257 258 259 |
# File 'lib/couchbase/collection_options.rb', line 256 def content(path_or_index, transcoder = self.transcoder) field = get_field_at_index(path_or_index) transcoder.decode(field.value, :json) end |