Module: AuthAssistant::RoleStrategy::MultiRoleAssignment

Defined in:
lib/auth_assistant/role_strategies/multi_role_assignment.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



24
25
26
# File 'lib/auth_assistant/role_strategies/multi_role_assignment.rb', line 24

def self.included(base)  
  base.extend(ClassMethods)
end

Instance Method Details

#role?(role) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
# File 'lib/auth_assistant/role_strategies/multi_role_assignment.rb', line 5

def role?(role)
  return true if roles && roles.include?(role.to_s)
  false
end