Class: PickyGuard::RolePolicies

Inherits:
Object
  • Object
show all
Defined in:
lib/picky_guard/role_policies.rb

Direct Known Subclasses

RolePolicies

Instance Method Summary collapse

Instance Method Details

#map(role, policies) ⇒ Object



7
8
9
10
# File 'lib/picky_guard/role_policies.rb', line 7

def map(role, policies)
  validate_parameters(policies, role)
  safe_map[role] = policies
end

#policies_for(role) ⇒ Object



16
17
18
# File 'lib/picky_guard/role_policies.rb', line 16

def policies_for(role)
  safe_map[role]
end

#rolesObject



12
13
14
# File 'lib/picky_guard/role_policies.rb', line 12

def roles
  safe_map.keys
end