Class: Trax::Controller::Authorization::Pundit::BasePolicy
- Inherits:
-
Object
- Object
- Trax::Controller::Authorization::Pundit::BasePolicy
- Defined in:
- lib/trax/controller/authorization/pundit/base_policy.rb
Instance Attribute Summary collapse
-
#resource ⇒ Object
Returns the value of attribute resource.
-
#result ⇒ Object
Returns the value of attribute result.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(user, resource) ⇒ BasePolicy
constructor
Result is set to true by default because it makes chaining easy with &&=.
Constructor Details
#initialize(user, resource) ⇒ BasePolicy
Result is set to true by default because it makes chaining easy with &&=
9 10 11 12 13 |
# File 'lib/trax/controller/authorization/pundit/base_policy.rb', line 9 def initialize(user, resource) @user = user @resource = resource @result = true end |
Instance Attribute Details
#resource ⇒ Object
Returns the value of attribute resource.
6 7 8 |
# File 'lib/trax/controller/authorization/pundit/base_policy.rb', line 6 def resource @resource end |
#result ⇒ Object
Returns the value of attribute result.
6 7 8 |
# File 'lib/trax/controller/authorization/pundit/base_policy.rb', line 6 def result @result end |
#user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'lib/trax/controller/authorization/pundit/base_policy.rb', line 6 def user @user end |