Class: Zookeeper::Stat
- Inherits:
-
Object
- Object
- Zookeeper::Stat
- Defined in:
- lib/zookeeper/stat.rb
Instance Attribute Summary collapse
-
#aversion ⇒ Object
readonly
Returns the value of attribute aversion.
-
#ctime ⇒ Object
readonly
Returns the value of attribute ctime.
-
#cversion ⇒ Object
readonly
Returns the value of attribute cversion.
-
#czxid ⇒ Object
readonly
Returns the value of attribute czxid.
-
#dataLength ⇒ Object
(also: #data_length)
readonly
Returns the value of attribute dataLength.
-
#ephemeralOwner ⇒ Object
(also: #ephemeral_owner)
readonly
Returns the value of attribute ephemeralOwner.
-
#exists ⇒ Object
readonly
Returns the value of attribute exists.
-
#mtime ⇒ Object
readonly
Returns the value of attribute mtime.
-
#mzxid ⇒ Object
readonly
Returns the value of attribute mzxid.
-
#numChildren ⇒ Object
(also: #num_children)
readonly
Returns the value of attribute numChildren.
-
#pzxid ⇒ Object
readonly
Returns the value of attribute pzxid.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #exists? ⇒ Boolean
-
#initialize(val) ⇒ Stat
constructor
A new instance of Stat.
Constructor Details
#initialize(val) ⇒ Stat
Returns a new instance of Stat.
9 10 11 12 13 14 15 |
# File 'lib/zookeeper/stat.rb', line 9 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 |
Instance Attribute Details
#aversion ⇒ Object (readonly)
Returns the value of attribute aversion.
3 4 5 |
# File 'lib/zookeeper/stat.rb', line 3 def aversion @aversion end |
#ctime ⇒ Object (readonly)
Returns the value of attribute ctime.
3 4 5 |
# File 'lib/zookeeper/stat.rb', line 3 def ctime @ctime end |
#cversion ⇒ Object (readonly)
Returns the value of attribute cversion.
3 4 5 |
# File 'lib/zookeeper/stat.rb', line 3 def cversion @cversion end |
#czxid ⇒ Object (readonly)
Returns the value of attribute czxid.
3 4 5 |
# File 'lib/zookeeper/stat.rb', line 3 def czxid @czxid end |
#dataLength ⇒ Object (readonly) Also known as: data_length
Returns the value of attribute dataLength.
3 4 5 |
# File 'lib/zookeeper/stat.rb', line 3 def dataLength @dataLength end |
#ephemeralOwner ⇒ Object (readonly) Also known as: ephemeral_owner
Returns the value of attribute ephemeralOwner.
3 4 5 |
# File 'lib/zookeeper/stat.rb', line 3 def ephemeralOwner @ephemeralOwner end |
#exists ⇒ Object (readonly)
Returns the value of attribute exists.
3 4 5 |
# File 'lib/zookeeper/stat.rb', line 3 def exists @exists end |
#mtime ⇒ Object (readonly)
Returns the value of attribute mtime.
3 4 5 |
# File 'lib/zookeeper/stat.rb', line 3 def mtime @mtime end |
#mzxid ⇒ Object (readonly)
Returns the value of attribute mzxid.
3 4 5 |
# File 'lib/zookeeper/stat.rb', line 3 def mzxid @mzxid end |
#numChildren ⇒ Object (readonly) Also known as: num_children
Returns the value of attribute numChildren.
3 4 5 |
# File 'lib/zookeeper/stat.rb', line 3 def numChildren @numChildren end |
#pzxid ⇒ Object (readonly)
Returns the value of attribute pzxid.
3 4 5 |
# File 'lib/zookeeper/stat.rb', line 3 def pzxid @pzxid end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
3 4 5 |
# File 'lib/zookeeper/stat.rb', line 3 def version @version end |
Instance Method Details
#exists? ⇒ Boolean
17 18 19 |
# File 'lib/zookeeper/stat.rb', line 17 def exists? @exists end |