Module: TroleGroups::Operations::Write
- Included in:
- TroleGroups::Operations
- Defined in:
- lib/trole_groups/operations/write.rb
Instance Method Summary collapse
-
#+(*role_groups) ⇒ true, ...
(also: #<<, #add, #add!)
Add a set of role_groups to the role subject.
-
#-(*role_groups) ⇒ true, ...
(also: #remove, #remove!)
Remove a set of role_groups from the role subject.
-
#==(*role_groups) ⇒ Object
(also: #equal, #same_as)
Test role_groups equality.
-
#clear ⇒ true, ...
(also: #clear!)
Clear all the role_groups from the role subject.
Instance Method Details
#+(*role_groups) ⇒ true, ... Also known as: <<, add, add!
Add a set of role_groups to the role subject
17 18 19 |
# File 'lib/trole_groups/operations/write.rb', line 17 def + *role_groups rolegroup_subject.add_role_groups role_groups.to_symbols_uniq end |
#-(*role_groups) ⇒ true, ... Also known as: remove, remove!
Remove a set of role_groups from the role subject
27 28 29 |
# File 'lib/trole_groups/operations/write.rb', line 27 def - *role_groups rolegroup_subject.remove_role_groups role_groups.to_symbols_uniq end |
#==(*role_groups) ⇒ Object Also known as: equal, same_as
Test role_groups equality
8 9 10 |
# File 'lib/trole_groups/operations/write.rb', line 8 def == *role_groups rolegroup_subject.rolegroup_list == role_groups.to_symbols_uniq end |
#clear ⇒ true, ... Also known as: clear!
Clear all the role_groups from the role subject
36 37 38 |
# File 'lib/trole_groups/operations/write.rb', line 36 def clear rolegroup_subject.clear_role_groups! end |