Class: ZooKeeper::Id

Inherits:
Object
  • Object
show all
Defined in:
lib/zookeeper/id.rb

Overview

this isn't really used in this gem :nodoc:

Constant Summary

ANYONE_ID_UNSAFE =
Id.new("world", "anyone")
AUTH_IDS =
Id.new("auth", "")

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Id) initialize(scheme, id)

A new instance of Id



8
9
10
# File 'lib/zookeeper/id.rb', line 8

def initialize(scheme, id)
  @scheme, @identification = scheme, id
end

Instance Attribute Details

- (Object) identification (readonly)

Returns the value of attribute identification



6
7
8
# File 'lib/zookeeper/id.rb', line 6

def identification
  @identification
end

- (Object) scheme (readonly)

Returns the value of attribute scheme



6
7
8
# File 'lib/zookeeper/id.rb', line 6

def scheme
  @scheme
end

Instance Method Details

- (Object) ==(obj)



12
13
14
15
# File 'lib/zookeeper/id.rb', line 12

def ==(obj)
  self.scheme == obj.scheme &&
  self.identification == obj.identification
end