Class: Zimbra::Cos

Inherits:
Object
  • Object
show all
Defined in:
lib/zimbra/cos.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#aclsObject

Returns the value of attribute acls.



21
22
23
# File 'lib/zimbra/cos.rb', line 21

def acls
  @acls
end

#idObject

Returns the value of attribute id.



21
22
23
# File 'lib/zimbra/cos.rb', line 21

def id
  @id
end

#nameObject

Returns the value of attribute name.



21
22
23
# File 'lib/zimbra/cos.rb', line 21

def name
  @name
end

Class Method Details

.acl_nameObject



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

#deleteObject



33
34
35
# File 'lib/zimbra/cos.rb', line 33

def delete
  CosService.delete(self)
end

#saveObject



29
30
31
# File 'lib/zimbra/cos.rb', line 29

def save
  CosService.modify(self)
end