class Flor::Pro::Move

Public Instance Methods

pre_execute() click to toggle source
# File lib/flor/pcore/move.rb, line 17
def pre_execute

  @node['atts_accepting_symbols'] = %w[ to ]

  @node['atts'] = []
end
receive_last() click to toggle source
# File lib/flor/pcore/move.rb, line 24
def receive_last

  ref = att('ref', nil)
  nid = tags_to_nids(ref).first || @node['heat'][1]['nid']

  to = att('to')

  rep = is_ancestor_node?(nid) ? [] : wrap_reply

  wrap_cancel(
    'nid' => nid,
    'flavour' => heap, # "move"
    'payload' => rep.any? ? payload.copy_current : payload.current,
    'to' => to) +
  rep
end