Class: Zimbra::Cos
- Inherits:
-
Object
- Object
- Zimbra::Cos
- Defined in:
- lib/zimbra/cos.rb
Instance Attribute Summary collapse
-
#acls ⇒ Object
Returns the value of attribute acls.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(id, name, acls = []) ⇒ Cos
constructor
A new instance of Cos.
- #save ⇒ Object
Constructor Details
#initialize(id, name, acls = []) ⇒ Cos
Returns a new instance of Cos.
23 24 25 26 27 |
# File 'lib/zimbra/cos.rb', line 23 def initialize(id, name, acls = []) self.id = id self.name = name self.acls = acls || [] end |
Instance Attribute Details
#acls ⇒ Object
Returns the value of attribute acls.
21 22 23 |
# File 'lib/zimbra/cos.rb', line 21 def acls @acls end |
#id ⇒ Object
Returns the value of attribute id.
21 22 23 |
# File 'lib/zimbra/cos.rb', line 21 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
21 22 23 |
# File 'lib/zimbra/cos.rb', line 21 def name @name end |
Class Method Details
.acl_name ⇒ Object
16 17 18 |
# File 'lib/zimbra/cos.rb', line 16 def acl_name 'cos' end |
.create(name) ⇒ Object
12 13 14 |
# File 'lib/zimbra/cos.rb', line 12 def create(name) CosService.create(name) end |
.find_by_id(id) ⇒ Object
4 5 6 |
# File 'lib/zimbra/cos.rb', line 4 def find_by_id(id) CosService.get_by_id(id) end |
.find_by_name(name) ⇒ Object
8 9 10 |
# File 'lib/zimbra/cos.rb', line 8 def find_by_name(name) CosService.get_by_name(name) end |
Instance Method Details
#delete ⇒ Object
33 34 35 |
# File 'lib/zimbra/cos.rb', line 33 def delete CosService.delete(self) end |
#save ⇒ Object
29 30 31 |
# File 'lib/zimbra/cos.rb', line 29 def save CosService.modify(self) end |