module Trole::Api::Write

Public Instance Methods

clear_role!() click to toggle source

Clears the role of the user @return (see set_role)

# File lib/trole/api/write.rb, line 21
def clear_role!
  store.clear!
end
role=(new_role)
Alias for: set_role
set_role(new_role) click to toggle source

Set the role of the subject to a new role @param [Symbol] the role to set @return [true, false, Error] true if ok, false if not valid, Error on some error

# 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
Also aliased as: role=