Class: Critic::AuthorizationDenied
- Defined in:
- lib/critic/authorization_denied.rb
Overview
Custom error class for authorization failures
Constant Summary collapse
- DEFAULT_MESSAGE =
'Authorization denied'
Instance Attribute Summary collapse
-
#authorization ⇒ Object
readonly
Returns the value of attribute authorization.
Instance Method Summary collapse
-
#initialize(authorization) ⇒ AuthorizationDenied
constructor
A new instance of AuthorizationDenied.
Constructor Details
#initialize(authorization) ⇒ AuthorizationDenied
Returns a new instance of AuthorizationDenied.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/critic/authorization_denied.rb', line 8 def initialize() @authorization = = if ..any? ..join(',') else DEFAULT_MESSAGE end super() end |
Instance Attribute Details
#authorization ⇒ Object (readonly)
Returns the value of attribute authorization.
6 7 8 |
# File 'lib/critic/authorization_denied.rb', line 6 def @authorization end |