Class: Tasker::WorkflowStep::StepFinder
- Inherits:
-
Object
- Object
- Tasker::WorkflowStep::StepFinder
- Defined in:
- app/models/tasker/workflow_step.rb
Overview
Service class to find steps by name Reduces complexity by organizing step search logic
Class Method Summary collapse
-
.find_by_name(steps, name) ⇒ WorkflowStep?
Find step by name in provided collection or task hierarchy.
Class Method Details
.find_by_name(steps, name) ⇒ WorkflowStep?
Find step by name in provided collection or task hierarchy
208 209 210 211 212 213 214 215 216 217 |
# File 'app/models/tasker/workflow_step.rb', line 208 def find_by_name(steps, name) return nil if steps.empty? || name.nil? # First check direct match in provided steps direct_match = find_direct_match(steps, name) return direct_match if direct_match # Fall back to task-wide search using DAG relationships find_in_task_hierarchy(steps, name) end |