Class: BranchTasks::RandomSequence
- Inherits:
-
Sequence
- Object
- Sequence
- BranchTasks::RandomSequence
- Defined in:
- lib/behave_fun/branch_tasks/random_sequence.rb
Instance Attribute Summary collapse
-
#order ⇒ Object
Returns the value of attribute order.
Instance Method Summary collapse
Instance Attribute Details
#order ⇒ Object
Returns the value of attribute order.
3 4 5 |
# File 'lib/behave_fun/branch_tasks/random_sequence.rb', line 3 def order @order end |
Instance Method Details
#execute ⇒ Object
5 6 7 8 9 |
# File 'lib/behave_fun/branch_tasks/random_sequence.rb', line 5 def execute @order = (0...@children.size).to_a.shuffle unless @order @children[@order[@current_child_idx]].run end |
#serializable_status_fields ⇒ Object
16 17 18 |
# File 'lib/behave_fun/branch_tasks/random_sequence.rb', line 16 def serializable_status_fields [:current_child_idx, :order] end |
#start ⇒ Object
11 12 13 14 |
# File 'lib/behave_fun/branch_tasks/random_sequence.rb', line 11 def start super @order = nil end |