Class: RbacCore::ComputedPermissions
- Inherits:
-
Object
- Object
- RbacCore::ComputedPermissions
- Defined in:
- lib/rbac_core/computed_permissions.rb
Instance Method Summary collapse
- #call(context, *args) ⇒ Object
- #concat(permissions) ⇒ Object
-
#initialize(permissions = []) ⇒ ComputedPermissions
constructor
A new instance of ComputedPermissions.
Constructor Details
#initialize(permissions = []) ⇒ ComputedPermissions
Returns a new instance of ComputedPermissions.
7 8 9 10 |
# File 'lib/rbac_core/computed_permissions.rb', line 7 def initialize( = []) @permissions = [].concat .to_a regroup! end |
Instance Method Details
#call(context, *args) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/rbac_core/computed_permissions.rb', line 19 def call(context, *args) @permissions.each do || .call(context, *args) end self end |
#concat(permissions) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/rbac_core/computed_permissions.rb', line 12 def concat() @permissions.concat regroup! self end |