Methods

Included Modules

Class/Module Index [+]

Quicksearch

Ruote::Exp::CommandedExpression

A parent class for CursorExpression and IteratorExpression

Public Instance Methods

reply(workitem) click to toggle source
# File lib/ruote/exp/commanded.rb, line 39
def reply (workitem)

  workitem = h.command_workitem || workitem
  h.command_workitem = nil

  # command/answer may come from
  #
  # a) a child, regular case, easy
  # b) somewhere else, which means we have to cancel the current child
  #    and then make sure the comand is interpreted

  # a)

  if Ruote::FlowExpressionId.direct_child?(h.fei, workitem['fei'])
    return move_on(workitem)
  end

  # b)

  h.command_workitem = workitem
  h.command_workitem['fei'] = h.children.first

  do_persist || return

  @context.storage.put_msg('cancel', 'fei' => h.children.first)

  # iteration will be done at when cancelled child replies
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.