Class: CanTango::PermissionEngine::Selector::RoleGroups
- Defined in:
- lib/cantango/permission_engine/selector/role_groups.rb
Instance Attribute Summary collapse
-
#role_groups ⇒ Object
readonly
Returns the value of attribute role_groups.
Attributes inherited from Base
Instance Method Summary collapse
- #filter(role_group) ⇒ Object
-
#initialize(collector) ⇒ RoleGroups
constructor
A new instance of RoleGroups.
- #relevant?(role_group) ⇒ Boolean
Methods inherited from Base
Constructor Details
#initialize(collector) ⇒ RoleGroups
Returns a new instance of RoleGroups.
7 8 9 |
# File 'lib/cantango/permission_engine/selector/role_groups.rb', line 7 def initialize collector @role_groups = collector.role_groups_list end |
Instance Attribute Details
#role_groups ⇒ Object (readonly)
Returns the value of attribute role_groups.
5 6 7 |
# File 'lib/cantango/permission_engine/selector/role_groups.rb', line 5 def role_groups @role_groups end |
Instance Method Details
#filter(role_group) ⇒ Object
15 16 17 |
# File 'lib/cantango/permission_engine/selector/role_groups.rb', line 15 def filter role_group CanTango::Filters::RoleGroupFilter.new role_group, role_groups end |
#relevant?(role_group) ⇒ Boolean
11 12 13 |
# File 'lib/cantango/permission_engine/selector/role_groups.rb', line 11 def relevant? role_group filter(role_group).valid? end |