Module: ZK::Group::Common

Included in:
Group, Member
Defined in:
lib/zk-group.rb

Overview

common znode data access

Instance Method Summary collapse

Instance Method Details

#dataObject

the data my znode contains



16
17
18
# File 'lib/zk-group.rb', line 16

def data
  zk.get(path).first
end

#data=(val) ⇒ String

Set the data in my group znode (the data at #path)

In the base implementation, no version is given, this will just overwrite whatever is currently there.

Parameters:

  • val (String)

    the data to set

Returns:

  • (String)

    the data that was set



27
28
29
30
# File 'lib/zk-group.rb', line 27

def data=(val)
  zk.set(path, val)
  val
end