Method: Critic::AuthorizationDenied#initialize

Defined in:
lib/critic/authorization_denied.rb

#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)
  @authorization = authorization

  message = if authorization.messages.any?
              authorization.messages.join(',')
            else
              DEFAULT_MESSAGE
            end
  super(message)
end