Class: Archangel::ApplicationPolicy::Scope
- Inherits:
-
Object
- Object
- Archangel::ApplicationPolicy::Scope
- Defined in:
- app/policies/archangel/application_policy.rb
Overview
Nested scope resource
Instance Attribute Summary collapse
-
#scope ⇒ Object
readonly
Scope to check.
-
#user ⇒ Object
readonly
User to check policy for.
Instance Method Summary collapse
-
#initialize(user, scope) ⇒ Scope
constructor
Policy scope initializer.
-
#resolve ⇒ Object
Resolvable resources.
Constructor Details
#initialize(user, scope) ⇒ Scope
Policy scope initializer
121 122 123 124 |
# File 'app/policies/archangel/application_policy.rb', line 121 def initialize(user, scope) @user = user @scope = scope end |
Instance Attribute Details
#scope ⇒ Object (readonly)
Scope to check
108 109 110 |
# File 'app/policies/archangel/application_policy.rb', line 108 def scope @scope end |
#user ⇒ Object (readonly)
User to check policy for
113 114 115 |
# File 'app/policies/archangel/application_policy.rb', line 113 def user @user end |
Instance Method Details
#resolve ⇒ Object
Resolvable resources
131 132 133 |
# File 'app/policies/archangel/application_policy.rb', line 131 def resolve scope end |