Sha256: 0746f77e533d7962e86c8e8e17de821b128358743340cb863699fdf8ddd1d060

Contents?: true

Size: 601 Bytes

Versions: 7

Compression:

Stored size: 601 Bytes

Contents

module Tap
  module Support
    module Joins
      
      # Merge (or simple merge) passes the results of each source to the
      # target without synchronization.
      class Merge < ReverseJoin
        def join(target, sources)
          sources.each do |source|
            # merging can use the existing audit trails... each distinct 
            # input is getting sent to one place (the target)
            complete(source) do |_result| 
              yield(_result) if block_given?
              enq(target, _result)
            end
          end
        end
      end
      
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
bahuvrihi-tap-0.10.8 lib/tap/support/joins/merge.rb
bahuvrihi-tap-0.11.0 lib/tap/support/joins/merge.rb
bahuvrihi-tap-0.11.1 lib/tap/support/joins/merge.rb
bahuvrihi-tap-0.11.2 lib/tap/support/joins/merge.rb
bahuvrihi-tap-0.12.0 lib/tap/support/joins/merge.rb
tap-0.11.1 lib/tap/support/joins/merge.rb
tap-0.11.0 lib/tap/support/joins/merge.rb