Class: Decidim::Verifications::DestroyUserAuthorization
- Inherits:
-
Command
- Object
- Command
- Decidim::Verifications::DestroyUserAuthorization
- Defined in:
- app/commands/decidim/verifications/destroy_user_authorization.rb
Overview
A command to Destroy the Authorization of a user.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(authorization) ⇒ DestroyUserAuthorization
constructor
A new instance of DestroyUserAuthorization.
Constructor Details
#initialize(authorization) ⇒ DestroyUserAuthorization
Returns a new instance of DestroyUserAuthorization.
7 8 9 |
# File 'app/commands/decidim/verifications/destroy_user_authorization.rb', line 7 def initialize() @authorization = end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/commands/decidim/verifications/destroy_user_authorization.rb', line 11 def call return broadcast(:invalid) unless .destroy! broadcast(:ok, ) end |