Class: Riak::Crdt::InnerRegister

Inherits:
String show all
Defined in:
lib/riak/crdt/inner_register.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from String

#blank?

Constructor Details

#initialize(parent, *args, &block) ⇒ InnerRegister

Returns a new instance of InnerRegister.



6
7
8
9
10
# File 'lib/riak/crdt/inner_register.rb', line 6

def initialize(parent, *args, &block)
  @parent = parent
  super(*args, &block)
  freeze
end

Instance Attribute Details

#parentObject (readonly)

Returns the value of attribute parent.



4
5
6
# File 'lib/riak/crdt/inner_register.rb', line 4

def parent
  @parent
end

Class Method Details

.deleteObject



19
20
21
22
23
# File 'lib/riak/crdt/inner_register.rb', line 19

def self.delete
  Operation::Delete.new.tap do |op|
    op.type = :register
  end
end

.update(value) ⇒ Object



12
13
14
15
16
17
# File 'lib/riak/crdt/inner_register.rb', line 12

def self.update(value)
  Operation::Update.new.tap do |op|
    op.value = value
    op.type = :register
  end
end