Class: Riak::Client::BeefcakeProtobuffsBackend::CrdtLoader::MapLoader Private

Inherits:
Object
  • Object
show all
Defined in:
lib/riak/client/beefcake/crdt/map_loader.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(map_value) ⇒ MapLoader

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of MapLoader.



23
24
25
# File 'lib/riak/client/beefcake/crdt/map_loader.rb', line 23

def initialize(map_value)
  @value = map_value
end

Class Method Details

.for_value(resp) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
21
# File 'lib/riak/client/beefcake/crdt/map_loader.rb', line 18

def self.for_value(resp)
  return nil unless resp.map_value
  new resp.map_value
end

Instance Method Details

#rubyfyObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/riak/client/beefcake/crdt/map_loader.rb', line 27

def rubyfy
  accum = {
    counters: {},
    flags: {},
    maps: {},
    registers: {},
    sets: {}
  }

  contents_loop @value, accum
end