module TroleGroups::Operations::Write

Public Instance Methods

+(*role_groups) click to toggle source

Add a set of role_groups to the role subject @param [Array<Symbol>] role_groups list to add @return [true, false, Error] true if added, false if static or invalid, Error on some error

# File lib/trole_groups/operations/write.rb, line 17
def + *role_groups
  rolegroup_subject.add_role_groups role_groups.to_symbols_uniq
end
Also aliased as: <<, add, add!
-(*role_groups) click to toggle source

Remove a set of role_groups from the role subject @param [Array<Symbol>] role_groups list to add @return [true, false, Error] true if removed, false if static or invalid, Error on some error

# File lib/trole_groups/operations/write.rb, line 27
def - *role_groups
  rolegroup_subject.remove_role_groups role_groups.to_symbols_uniq
end
Also aliased as: remove, remove!
<<(*role_groups)
Alias for: +
==(*role_groups) click to toggle source

Test role_groups equality @param [Array<Symbol>] role_groups list to test

# File lib/trole_groups/operations/write.rb, line 8
def == *role_groups
  rolegroup_subject.rolegroup_list == role_groups.to_symbols_uniq
end
add(*role_groups)
Alias for: +
add!(*role_groups)
Alias for: +
clear() click to toggle source

Clear all the role_groups from the role subject @param [Array<Symbol>] role_groups list to add @return [true, false, Error] true if removed, false if static or invalid, Error on some error

# File lib/trole_groups/operations/write.rb, line 36
def clear
  rolegroup_subject.clear_role_groups!
end
Also aliased as: clear!
clear!()
Alias for: clear
remove(*role_groups)
Alias for: -
remove!(*role_groups)
Alias for: -