Class: CanTango::PermissionEngine::Selector::UserTypes

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

Instance Attribute Summary collapse

Attributes inherited from Base

#subject

Instance Method Summary collapse

Methods inherited from Base

#select

Constructor Details

#initialize(subject) ⇒ UserTypes

Returns a new instance of UserTypes.



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

def initialize subject
  @user_type = subject.user.class.to_s.underscore
end

Instance Attribute Details

#user_typeObject (readonly)

Returns the value of attribute user_type.



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

def user_type
  @user_type
end