Class: BranchTasks::DynamicGuardSelector
- Inherits:
-
Task
- Object
- Task
- BranchTasks::DynamicGuardSelector
- Defined in:
- lib/behave_fun/branch_tasks/dynamic_guard_selector.rb
Instance Method Summary collapse
- #child_fail ⇒ Object
- #child_running ⇒ Object
- #child_success ⇒ Object
- #execute ⇒ Object
- #start ⇒ Object
Instance Method Details
#child_fail ⇒ Object
26 27 28 |
# File 'lib/behave_fun/branch_tasks/dynamic_guard_selector.rb', line 26 def child_fail fail end |
#child_running ⇒ Object
18 19 20 |
# File 'lib/behave_fun/branch_tasks/dynamic_guard_selector.rb', line 18 def child_running running end |
#child_success ⇒ Object
22 23 24 |
# File 'lib/behave_fun/branch_tasks/dynamic_guard_selector.rb', line 22 def child_success success end |
#execute ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/behave_fun/branch_tasks/dynamic_guard_selector.rb', line 3 def execute child = @children.find { _1.guard_passed? } if @current_child != child @current_child.cancel if @current_child @current_child = child @current_child.reset end @current_child.run end |
#start ⇒ Object
13 14 15 16 |
# File 'lib/behave_fun/branch_tasks/dynamic_guard_selector.rb', line 13 def start super @current_child = nil end |