Class: Zimbra::Domain
- Inherits:
-
Object
- Object
- Zimbra::Domain
- Defined in:
- lib/zimbra/domain.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
- .acl_name ⇒ Object
- .all ⇒ Object
- .create(name, attributes = {}) ⇒ Object
- .find_by_id(id) ⇒ Object
- .find_by_name(name) ⇒ Object
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(id, name, acls = []) ⇒ Domain
constructor
A new instance of Domain.
- #save ⇒ Object
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
#acls ⇒ Object
Returns the value of attribute acls.
25 26 27 |
# File 'lib/zimbra/domain.rb', line 25 def acls @acls end |
#id ⇒ Object
Returns the value of attribute id.
25 26 27 |
# File 'lib/zimbra/domain.rb', line 25 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/zimbra/domain.rb', line 25 def name @name end |
Class Method Details
.acl_name ⇒ Object
20 21 22 |
# File 'lib/zimbra/domain.rb', line 20 def acl_name 'domain' end |
.all ⇒ Object
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
#delete ⇒ Object
37 38 39 |
# File 'lib/zimbra/domain.rb', line 37 def delete DomainService.delete(self) end |
#save ⇒ Object
33 34 35 |
# File 'lib/zimbra/domain.rb', line 33 def save DomainService.modify(self) end |