Sha256: 634bfb0f8cfbd6cd7236ab295874300b0308a8e9f8efef6dec9d226872db0d6d

Contents?: true

Size: 308 Bytes

Versions: 2

Compression:

Stored size: 308 Bytes

Contents

module MultiProcess

  # Receiver implementation storing process output
  # in string.
  #
  class StringReceiver < Receiver

    def received(process, name, message)
      get(name) << message
    end

    def get(name)
      @strings ||= Hash.new
      @strings[name.to_s] ||= String.new
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
multi_process-0.4.0 lib/multi_process/string_receiver.rb
multi_process-0.3.0 lib/multi_process/string_receiver.rb