Module: CMDx::Mergers::LastWriteWins Private

Extended by:
LastWriteWins
Included in:
LastWriteWins
Defined in:
lib/cmdx/mergers/last_write_wins.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Default merger. Shallow-merges the parallel task’s context into the workflow context via ‘Hash#merge` semantics; on key conflicts, the later-declared task wins.

Instance Method Summary collapse

Instance Method Details

#call(ctx, result) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • ctx (Context)

    workflow context being folded into

  • result (Result)

    successful parallel task result



17
18
19
# File 'lib/cmdx/mergers/last_write_wins.rb', line 17

def call(ctx, result)
  ctx.merge(result.context)
end