Class: Riak::Crdt::InnerFlag Private

Inherits:
Object
  • Object
show all
Defined in:
lib/riak/crdt/inner_flag.rb

Overview

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.

The InnerFlag is a boolean member of a Map. Since flag operations are extremely simple, this object simply provides internal API methods for TypedCollection to use.

Defined Under Namespace

Classes: FlagError

Class Method Summary collapse

Class Method Details

.deleteObject

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.



24
25
26
27
28
# File 'lib/riak/crdt/inner_flag.rb', line 24

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

.new(parent, value = false) ⇒ 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.



9
10
11
12
13
# File 'lib/riak/crdt/inner_flag.rb', line 9

def self.new(parent, value = false)
  ensure_boolean value

  return value
end

.update(value) ⇒ 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.



15
16
17
18
19
20
21
22
# File 'lib/riak/crdt/inner_flag.rb', line 15

def self.update(value)
  ensure_boolean value

  Operation::Update.new.tap do |op|
    op.value = value
    op.type = :flag
  end
end