Exception: Kadmin::Errors::Authorization
- Inherits:
-
Kadmin::Error
- Object
- StandardError
- Kadmin::Error
- Kadmin::Errors::Authorization
- Defined in:
- lib/kadmin/errors/authorization.rb
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(resource, user, reason) ⇒ Authorization
constructor
A new instance of Authorization.
Constructor Details
#initialize(resource, user, reason) ⇒ Authorization
Returns a new instance of Authorization.
6 7 8 9 10 11 12 |
# File 'lib/kadmin/errors/authorization.rb', line 6 def initialize(resource, user, reason) @resource = resource @user = user @reason = reason super("#{@user} is unauthorized to access #{@resource} => #{@reason}") end |
Instance Attribute Details
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
4 5 6 |
# File 'lib/kadmin/errors/authorization.rb', line 4 def reason @reason end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
4 5 6 |
# File 'lib/kadmin/errors/authorization.rb', line 4 def resource @resource end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
4 5 6 |
# File 'lib/kadmin/errors/authorization.rb', line 4 def user @user end |