Change callback name

A method like `role` would be expected to return a role (a getter). A more idiomatic name for this callback is `set_role`. Also, there is no need to use the lower level methods such as `write_attribute`.