Class: Zookeeper::ACLs::Id

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Id

Returns a new instance of Id.



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

def initialize(hash)
  @scheme = hash[:scheme]
  @id = hash[:id]
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/zookeeper/acls.rb', line 4

def id
  @id
end

#schemeObject (readonly)

Returns the value of attribute scheme.



4
5
6
# File 'lib/zookeeper/acls.rb', line 4

def scheme
  @scheme
end

Instance Method Details

#to_hashObject



10
11
12
# File 'lib/zookeeper/acls.rb', line 10

def to_hash
  { :id => id, :scheme => scheme }
end