Class: Zookeeper::ACLs::Id
- Inherits:
-
Object
- Object
- Zookeeper::ACLs::Id
- Defined in:
- lib/zookeeper/acls.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#scheme ⇒ Object
readonly
Returns the value of attribute scheme.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Id
constructor
A new instance of Id.
- #to_hash ⇒ Object
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
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/zookeeper/acls.rb', line 4 def id @id end |
#scheme ⇒ Object (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_hash ⇒ Object
10 11 12 |
# File 'lib/zookeeper/acls.rb', line 10 def to_hash { :id => id, :scheme => scheme } end |