Class: Operations::Task::Plan::ResultHandler
- Inherits:
-
Object
- Object
- Operations::Task::Plan::ResultHandler
- Defined in:
- app/models/operations/task/plan/result_handler.rb
Instance Method Summary collapse
- #call(task) ⇒ Object
- #immediate? ⇒ Boolean
-
#initialize(name) ⇒ ResultHandler
constructor
A new instance of ResultHandler.
Constructor Details
#initialize(name) ⇒ ResultHandler
Returns a new instance of ResultHandler.
2 3 4 |
# File 'app/models/operations/task/plan/result_handler.rb', line 2 def initialize name @name = name.to_sym end |
Instance Method Details
#call(task) ⇒ Object
8 |
# File 'app/models/operations/task/plan/result_handler.rb', line 8 def call(task) = task.update task_status: "completed", completed_at: Time.current |
#immediate? ⇒ Boolean
6 |
# File 'app/models/operations/task/plan/result_handler.rb', line 6 def immediate? = true |