Methods

Class/Module Index [+]

Quicksearch

Ruote::Exp::RedoExpression

Undoes and the redoes (re-applies) an expression identified by a tag.

pdef = Ruote.process_definition do
  sequence do
    alpha :tag => 'kilroy'
    _redo :ref => 'kilroy', :unless => '${f:ok} == true'
  end
end

will redo at tag 'kilroy' if the field 'ok' is not set to true.

(redo is escaped as _redo not to conflict with the "redo" Ruby keyword)

Maybe this case is better served by a cursor/rewind combination

pdef = Ruote.process_definition do
  cursor do
    alpha :tag => 'kilroy'
    rewind :unless => '${f:ok} == true'
  end
end

Public Instance Methods

apply() click to toggle source
# File lib/ruote/exp/fe_redo.rb, line 55
def apply

  ref = attribute(:ref) || attribute_text
  tag = ref ? lookup_variable(ref) : nil

  if tag

    @context.storage.put_msg('cancel', 'fei' => tag, 're_apply' => true)

    reply_to_parent(h.applied_workitem) unless ancestor?(tag)

  else

    reply_to_parent(h.applied_workitem)
  end
end
reply(workitem) click to toggle source
# File lib/ruote/exp/fe_redo.rb, line 72
def reply (workitem)

  # never called
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.