Class: Zimbra::DistributionList
- Inherits:
-
Object
- Object
- Zimbra::DistributionList
- Defined in:
- lib/zimbra/distribution_list.rb
Instance Attribute Summary collapse
-
#admin_console_ui_components ⇒ Object
Returns the value of attribute admin_console_ui_components.
-
#admin_group ⇒ Object
Returns the value of attribute admin_group.
-
#id ⇒ Object
Returns the value of attribute id.
-
#members ⇒ Object
Returns the value of attribute members.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
- .acl_name ⇒ Object
- .all ⇒ Object
- .create(name) ⇒ Object
- .find_by_id(id) ⇒ Object
- .find_by_name(name) ⇒ Object
Instance Method Summary collapse
- #admin_group? ⇒ Boolean
- #delete ⇒ Object
-
#initialize(options = {}) ⇒ DistributionList
constructor
A new instance of DistributionList.
- #new_members ⇒ Object
- #removed_members ⇒ Object
- #save ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ DistributionList
27 28 29 30 |
# File 'lib/zimbra/distribution_list.rb', line 27 def initialize( = {}) .each { |name, value| self.send("#{name}=", value) } @original_members = self.members.dup end |
Instance Attribute Details
#admin_console_ui_components ⇒ Object
Returns the value of attribute admin_console_ui_components.
25 26 27 |
# File 'lib/zimbra/distribution_list.rb', line 25 def admin_console_ui_components @admin_console_ui_components end |
#admin_group ⇒ Object
Returns the value of attribute admin_group.
25 26 27 |
# File 'lib/zimbra/distribution_list.rb', line 25 def admin_group @admin_group end |
#id ⇒ Object
Returns the value of attribute id.
25 26 27 |
# File 'lib/zimbra/distribution_list.rb', line 25 def id @id end |
#members ⇒ Object
Returns the value of attribute members.
25 26 27 |
# File 'lib/zimbra/distribution_list.rb', line 25 def members @members end |
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/zimbra/distribution_list.rb', line 25 def name @name end |
Class Method Details
.acl_name ⇒ Object
20 21 22 |
# File 'lib/zimbra/distribution_list.rb', line 20 def acl_name 'grp' end |
.all ⇒ Object
4 5 6 |
# File 'lib/zimbra/distribution_list.rb', line 4 def all DistributionListService.all end |
.create(name) ⇒ Object
16 17 18 |
# File 'lib/zimbra/distribution_list.rb', line 16 def create(name) DistributionListService.create(name) end |
.find_by_id(id) ⇒ Object
8 9 10 |
# File 'lib/zimbra/distribution_list.rb', line 8 def find_by_id(id) DistributionListService.get_by_id(id) end |
.find_by_name(name) ⇒ Object
12 13 14 |
# File 'lib/zimbra/distribution_list.rb', line 12 def find_by_name(name) DistributionListService.get_by_name(name) end |
Instance Method Details
#admin_group? ⇒ Boolean
51 52 53 |
# File 'lib/zimbra/distribution_list.rb', line 51 def admin_group? @admin_group end |
#delete ⇒ Object
55 56 57 |
# File 'lib/zimbra/distribution_list.rb', line 55 def delete DistributionListService.delete(self) end |
#new_members ⇒ Object
40 41 42 |
# File 'lib/zimbra/distribution_list.rb', line 40 def new_members self.members - @original_members end |
#removed_members ⇒ Object
44 45 46 |
# File 'lib/zimbra/distribution_list.rb', line 44 def removed_members @original_members - self.members end |
#save ⇒ Object
59 60 61 |
# File 'lib/zimbra/distribution_list.rb', line 59 def save DistributionListService.modify(self) end |