Class: Zimbra::Domain

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, name, acls = []) ⇒ Domain

Returns a new instance of Domain.



27
28
29
30
31
# File 'lib/zimbra/domain.rb', line 27

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.



25
26
27
# File 'lib/zimbra/domain.rb', line 25

def acls
  @acls
end

#idObject

Returns the value of attribute id.



25
26
27
# File 'lib/zimbra/domain.rb', line 25

def id
  @id
end

#nameObject

Returns the value of attribute name.



25
26
27
# File 'lib/zimbra/domain.rb', line 25

def name
  @name
end

Class Method Details

.acl_nameObject



20
21
22
# File 'lib/zimbra/domain.rb', line 20

def acl_name
  'domain'
end

.allObject



4
5
6
# File 'lib/zimbra/domain.rb', line 4

def all
  DomainService.all
end

.create(name, attributes = {}) ⇒ Object



16
17
18
# File 'lib/zimbra/domain.rb', line 16

def create(name, attributes = {})
  DomainService.create(name, attributes) 
end

.find_by_id(id) ⇒ Object



8
9
10
# File 'lib/zimbra/domain.rb', line 8

def find_by_id(id)
  DomainService.get_by_id(id)
end

.find_by_name(name) ⇒ Object



12
13
14
# File 'lib/zimbra/domain.rb', line 12

def find_by_name(name)
  DomainService.get_by_name(name)
end

Instance Method Details

#deleteObject



37
38
39
# File 'lib/zimbra/domain.rb', line 37

def delete
  DomainService.delete(self)
end

#saveObject



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

def save
  DomainService.modify(self)
end