Class: CanTango::Permit::RoleGroup

Inherits:
Base
  • Object
show all
Extended by:
Helpers::RoleMethods, ClassMethods
Includes:
Helpers::RoleMethods, Helper::RoleMatcher
Defined in:
lib/cantango/roles_ext/permit/role_group.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helper::RoleMatcher

#role_group_match?, #role_match?

Constructor Details

#initialize(executor) ⇒ RoleGroup

creates the permit



11
12
13
# File 'lib/cantango/roles_ext/permit/role_group.rb', line 11

def initialize executor
  super
end

Class Method Details

.hash_keyObject



23
24
25
# File 'lib/cantango/roles_ext/permit/role_group.rb', line 23

def self.hash_key
  role_groups_list_meth
end

Instance Method Details

#execute!Object



15
16
17
# File 'lib/cantango/roles_ext/permit/role_group.rb', line 15

def execute!
  super
end

#nameObject



6
7
8
# File 'lib/cantango/roles_ext/permit/role_group.rb', line 6

def name
  self.class.permit_name self.class
end

#valid_for?(subject) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/cantango/roles_ext/permit/role_group.rb', line 19

def valid_for? subject
  in_role_group? subject
end