Class: Faalis::AdminOnlyPolicy::Scope
- Inherits:
-
Object
- Object
- Faalis::AdminOnlyPolicy::Scope
- Defined in:
- app/policies/faalis/admin_only_policy.rb
Instance Attribute Summary collapse
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(user, scope) ⇒ Scope
constructor
A new instance of Scope.
- #resolve ⇒ Object
Constructor Details
#initialize(user, scope) ⇒ Scope
Returns a new instance of Scope.
57 58 59 60 |
# File 'app/policies/faalis/admin_only_policy.rb', line 57 def initialize(user, scope) @@user = @user @scope = scope end |
Instance Attribute Details
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
55 56 57 |
# File 'app/policies/faalis/admin_only_policy.rb', line 55 def scope @scope end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
55 56 57 |
# File 'app/policies/faalis/admin_only_policy.rb', line 55 def user @user end |
Instance Method Details
#resolve ⇒ Object
62 63 64 |
# File 'app/policies/faalis/admin_only_policy.rb', line 62 def resolve scope end |