Sha256: 410b2e4ef70c5f77950949f47e4af0dd579ff5e7a76c977955dccd72b9d768b4
Contents?: true
Size: 711 Bytes
Versions: 28
Compression:
Stored size: 711 Bytes
Contents
module ZookeeperStat class Stat attr_reader :version, :exists, :czxid, :mzxid, :ctime, :mtime, :cversion, :aversion, :ephemeralOwner, :dataLength, :numChildren, :pzxid alias :ephemeral_owner :ephemeralOwner alias :num_children :numChildren alias :data_length :dataLength def initialize(val) @exists = !!val @czxid, @mzxid, @ctime, @mtime, @version, @cversion, @aversion, @ephemeralOwner, @dataLength, @numChildren, @pzxid = val if val.is_a?(Array) val.each { |k,v| instance_variable_set "@#{k}", v } if val.is_a?(Hash) raise ArgumentError unless (val.is_a?(Hash) or val.is_a?(Array) or val.nil?) end def exists? @exists end end end
Version data entries
28 entries across 28 versions & 2 rubygems