Module: SimpleRoles::One::Persistence

Included in:
RolesMethods
Defined in:
lib/simple_roles/one/persistence.rb

Instance Method Summary collapse

Instance Method Details

#roleObject



4
5
6
# File 'lib/simple_roles/one/persistence.rb', line 4

def role
  (r = super) ? r.to_sym : nil
end

#role=(r) ⇒ Object



8
9
10
11
# File 'lib/simple_roles/one/persistence.rb', line 8

def role= r
  check_role r
  r ? super(r.to_s) : super(nil)
end