Class: CanTango::Permit::Role
- Inherits:
-
Base
- Object
- Base
- CanTango::Permit::Role
- Extended by:
- Helpers::RoleMethods, ClassMethods
- Includes:
- Helpers::RoleMethods, Helper::RoleMatcher
- Defined in:
- lib/cantango/roles_ext/permit/role.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ability) ⇒ Role
constructor
creates the permit.
- #valid_for?(subject) ⇒ Boolean
Methods included from Helper::RoleMatcher
#role_group_match?, #role_match?
Constructor Details
#initialize(ability) ⇒ Role
creates the permit
9 10 11 |
# File 'lib/cantango/roles_ext/permit/role.rb', line 9 def initialize ability super end |
Class Method Details
.hash_key ⇒ Object
17 18 19 |
# File 'lib/cantango/roles_ext/permit/role.rb', line 17 def self.hash_key roles_list_meth end |
Instance Method Details
#valid_for?(subject) ⇒ Boolean
13 14 15 |
# File 'lib/cantango/roles_ext/permit/role.rb', line 13 def valid_for? subject in_role? subject end |