Class: Decidim::AccessRequests::Verification::Admin::DestroyAuthorization
- Inherits:
-
Rectify::Command
- Object
- Rectify::Command
- Decidim::AccessRequests::Verification::Admin::DestroyAuthorization
- Defined in:
- app/commands/decidim/access_requests/verification/admin/destroy_authorization.rb
Overview
A command to destroy an authorization.
Instance Method Summary collapse
-
#call ⇒ Object
Executes the command.
-
#initialize(authorization) ⇒ DestroyAuthorization
constructor
Public: Initializes the command.
Constructor Details
#initialize(authorization) ⇒ DestroyAuthorization
Public: Initializes the command.
authorization - The authorization object to destroy.
12 13 14 |
# File 'app/commands/decidim/access_requests/verification/admin/destroy_authorization.rb', line 12 def initialize() @authorization = end |
Instance Method Details
#call ⇒ Object
Executes the command. Broadcasts these events:
-
:ok when everything is valid.
-
:invalid if the authorization couldn’t be destroyed.
Returns nothing.
22 23 24 25 26 27 |
# File 'app/commands/decidim/access_requests/verification/admin/destroy_authorization.rb', line 22 def call return broadcast(:invalid) unless broadcast(:ok) end |