Sha256: 936cbb8d6100af0a994970a4aa0a4b223aa4aeb7d6717f0388936a17deb6d9ef

Contents?: true

Size: 675 Bytes

Versions: 87

Compression:

Stored size: 675 Bytes

Contents

module Zookeeper
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

87 entries across 87 versions & 2 rubygems

Version Path
zookeeper-1.2.2-java lib/zookeeper/stat.rb
zookeeper-1.2.1 lib/zookeeper/stat.rb
zookeeper-1.2.1-java lib/zookeeper/stat.rb
zookeeper-1.1.3 lib/zookeeper/stat.rb
zookeeper-1.1.3-java lib/zookeeper/stat.rb
zookeeper-1.2.0 lib/zookeeper/stat.rb
zookeeper-1.2.0-java lib/zookeeper/stat.rb
zookeeper-1.1.2 lib/zookeeper/stat.rb
zookeeper-1.1.2-java lib/zookeeper/stat.rb
zookeeper-1.1.1 lib/zookeeper/stat.rb
zookeeper-1.1.1-java lib/zookeeper/stat.rb
zookeeper-1.1.0 lib/zookeeper/stat.rb
zookeeper-1.1.0-java lib/zookeeper/stat.rb
zookeeper-1.0.6 lib/zookeeper/stat.rb
zookeeper-1.0.6-java lib/zookeeper/stat.rb
zookeeper-1.0.5 lib/zookeeper/stat.rb
zookeeper-1.0.5-java lib/zookeeper/stat.rb
zookeeper-1.0.4 lib/zookeeper/stat.rb
zookeeper-1.0.4-java lib/zookeeper/stat.rb
zookeeper-1.0.3 lib/zookeeper/stat.rb