Class: Collavre::Comments::WorkCommand
- Inherits:
-
Object
- Object
- Collavre::Comments::WorkCommand
- Includes:
- Concerns::WorkflowSupport
- Defined in:
- app/services/collavre/comments/work_command.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(comment:, user:) ⇒ WorkCommand
constructor
A new instance of WorkCommand.
Constructor Details
#initialize(comment:, user:) ⇒ WorkCommand
Returns a new instance of WorkCommand.
6 7 8 9 10 |
# File 'app/services/collavre/comments/work_command.rb', line 6 def initialize(comment:, user:) @comment = comment @user = user @creative = comment.creative.effective_origin end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/services/collavre/comments/work_command.rb', line 12 def call return unless work_command? execute_work rescue StandardError => e Rails.logger.error("Work command failed: #{e.}") e. end |