Class: Tasker::WorkflowStepTransition::TransitionDescriptionFormatter
- Inherits:
-
Object
- Object
- Tasker::WorkflowStepTransition::TransitionDescriptionFormatter
- Defined in:
- app/models/tasker/workflow_step_transition.rb
Overview
Service class to format transition descriptions Reduces complexity by organizing description logic by state
Class Method Summary collapse
-
.format(transition) ⇒ String
Format transition description based on state.
Class Method Details
.format(transition) ⇒ String
Format transition description based on state
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'app/models/tasker/workflow_step_transition.rb', line 346 def format(transition) case transition.to_state when 'pending' format_pending_description(transition) when 'in_progress' format_in_progress_description(transition) when 'complete' format_complete_description(transition) when 'error' format_error_description(transition) when 'cancelled' format_cancelled_description(transition) when 'resolved_manually' format_resolved_description(transition) else format_unknown_description(transition) end end |