Exception: KittyPolicy::AccessDenied

Inherits:
StandardError
  • Object
show all
Defined in:
lib/kitty_policy/access_denied.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actionObject (readonly)

Returns the value of attribute action.



5
6
7
# File 'lib/kitty_policy/access_denied.rb', line 5

def action
  @action
end

#subjectObject (readonly)

Returns the value of attribute subject.



5
6
7
# File 'lib/kitty_policy/access_denied.rb', line 5

def subject
  @subject
end

#userObject (readonly)

Returns the value of attribute user.



5
6
7
# File 'lib/kitty_policy/access_denied.rb', line 5

def user
  @user
end