Class: CanTango::PermissionEngine::Selector::Roles

Inherits:
Base
  • Object
show all
Defined in:
lib/cantango/permission_engine/selector/roles.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#subject

Instance Method Summary collapse

Methods inherited from Base

#select

Constructor Details

#initialize(subject) ⇒ Roles

Returns a new instance of Roles.



7
8
9
# File 'lib/cantango/permission_engine/selector/roles.rb', line 7

def initialize subject
  @roles = subject.roles_list
end

Instance Attribute Details

#rolesObject (readonly)

Returns the value of attribute roles.



5
6
7
# File 'lib/cantango/permission_engine/selector/roles.rb', line 5

def roles
  @roles
end