Class: Decidim::DirectVerifications::Verification::DestroyUserAuthorization
- Inherits:
-
Rectify::Command
- Object
- Rectify::Command
- Decidim::DirectVerifications::Verification::DestroyUserAuthorization
- Defined in:
- app/commands/decidim/direct_verifications/verification/destroy_user_authorization.rb
Overview
A command to destroy an authorization.
Instance Method Summary collapse
-
#call ⇒ Object
Executes the command.
-
#initialize(authorization) ⇒ DestroyUserAuthorization
constructor
Public: Initializes the command.
Constructor Details
#initialize(authorization) ⇒ DestroyUserAuthorization
Public: Initializes the command.
authorization - The authorization object to destroy.
11 12 13 |
# File 'app/commands/decidim/direct_verifications/verification/destroy_user_authorization.rb', line 11 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.
21 22 23 24 25 26 |
# File 'app/commands/decidim/direct_verifications/verification/destroy_user_authorization.rb', line 21 def call return broadcast(:invalid) unless broadcast(:ok) end |