Sha256: 6490f9b19041d869e677a42d891772028f46326bd08c3a5ea85dc8cd4a22de5e

Contents?: true

Size: 495 Bytes

Versions: 12

Compression:

Stored size: 495 Bytes

Contents

module Riak
  module Crdt
    class InnerRegister < String
      attr_reader :parent

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

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

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

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
riak-client-2.6.0 lib/riak/crdt/inner_register.rb
riak-client-2.5.0 lib/riak/crdt/inner_register.rb
riak-client-2.4.1 lib/riak/crdt/inner_register.rb
riak-client-2.4.0 lib/riak/crdt/inner_register.rb
riak-client-2.4.0.pre1 lib/riak/crdt/inner_register.rb
riak-client-2.3.2 lib/riak/crdt/inner_register.rb
riak-client-2.3.1 lib/riak/crdt/inner_register.rb
riak-client-2.3.0 lib/riak/crdt/inner_register.rb
riak-client-2.2.2 lib/riak/crdt/inner_register.rb
riak-client-2.2.1 lib/riak/crdt/inner_register.rb
riak-client-noenc-1.0.0 lib/riak/crdt/inner_register.rb
riak-client-2.2.0 lib/riak/crdt/inner_register.rb