class BehaveFun::BranchTasks::Sequence

Attributes

current_child_idx[RW]

Public Instance Methods

child_fail() click to toggle source
# File lib/behave_fun/branch_tasks/sequence.rb, line 27
def child_fail
  fail
end
child_running() click to toggle source
# File lib/behave_fun/branch_tasks/sequence.rb, line 14
def child_running
  running
end
child_success() click to toggle source
# File lib/behave_fun/branch_tasks/sequence.rb, line 18
def child_success
  @current_child_idx += 1
  if @current_child_idx >= children.size
    success
  else
    run
  end
end
execute() click to toggle source
# File lib/behave_fun/branch_tasks/sequence.rb, line 5
def execute
  @children[@current_child_idx].run
end
serializable_status_fields() click to toggle source
# File lib/behave_fun/branch_tasks/sequence.rb, line 31
def serializable_status_fields
  [:current_child_idx]
end
start() click to toggle source
Calls superclass method
# File lib/behave_fun/branch_tasks/sequence.rb, line 9
def start
  super
  @current_child_idx = 0
end