module Troles::Common::Operations::Write
Public Instance Methods
+(*roles)
click to toggle source
Add a set of roles to the role subject @param [Array<Symbol>] roles list to add @return [true, false, Error] true if added, false if static or invalid, Error on some error
# File lib/troles/common/operations/write.rb, line 17 def + *roles role_subject.add_roles roles end
-(*roles)
click to toggle source
Remove a set of roles from the role subject @param [Array<Symbol>] roles list to add @return [true, false, Error] true if removed, false if static or invalid, Error on some error
# File lib/troles/common/operations/write.rb, line 27 def - *roles role_subject.remove_roles roles end
==(*roles)
click to toggle source
Test roles equality @param [Array<Symbol>] roles list to test
# File lib/troles/common/operations/write.rb, line 8 def == *roles role_subject.role_list == roles.flatten end
clear()
click to toggle source
Clear all the roles from the role subject @param [Array<Symbol>] roles list to add @return [true, false, Error] true if removed, false if static or invalid, Error on some error
# File lib/troles/common/operations/write.rb, line 36 def clear role_subject.clear_roles! end
Also aliased as: clear!