Exception: KittyPolicy::AccessDenied
- Inherits:
-
StandardError
- Object
- StandardError
- KittyPolicy::AccessDenied
- Defined in:
- lib/kitty_policy/access_denied.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(user = nil, action = nil, subject = nil) ⇒ AccessDenied
constructor
A new instance of AccessDenied.
Constructor Details
#initialize(user = nil, action = nil, subject = nil) ⇒ AccessDenied
Returns a new instance of AccessDenied.
7 8 9 10 11 12 13 |
# File 'lib/kitty_policy/access_denied.rb', line 7 def initialize(user = nil, action = nil, subject = nil) @user = user @action = action @subject = subject super 'Not authorized' end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
5 6 7 |
# File 'lib/kitty_policy/access_denied.rb', line 5 def action @action end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
5 6 7 |
# File 'lib/kitty_policy/access_denied.rb', line 5 def subject @subject end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
5 6 7 |
# File 'lib/kitty_policy/access_denied.rb', line 5 def user @user end |