Module: Trole::Api::Write
- Defined in:
- lib/trole/api/write.rb
Instance Method Summary collapse
-
#clear_role! ⇒ true, ...
Clears the role of the user.
-
#set_role(new_role) ⇒ true, ...
(also: #role=)
Set the role of the subject to a new role.
Instance Method Details
#clear_role! ⇒ true, ...
Clears the role of the user
21 22 23 |
# File 'lib/trole/api/write.rb', line 21 def clear_role! store.clear! end |
#set_role(new_role) ⇒ true, ... Also known as: role=
Set the role of the subject to a new role
12 13 14 15 16 |
# File 'lib/trole/api/write.rb', line 12 def set_role new_role value = make_valid_role new_role return false if !value store.set_role(value) end |