Sha256: 7c04d8a21d1bfa16e1991d4fdc29559a881ed82264d7480832d4b0ecec7d6c56

Contents?: true

Size: 429 Bytes

Versions: 4

Compression:

Stored size: 429 Bytes

Contents

# frozen_string_literal: true

module Phobos
  class BatchMessage
    attr_accessor :key, :partition, :offset, :payload

    def initialize(key:, partition:, offset:, payload:)
      @key = key
      @partition = partition
      @offset = offset
      @payload = payload
    end

    def ==(other)
      [:key, :partition, :offset, :payload].all? do |s|
        public_send(s) == other.public_send(s)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
phobos-1.8.3.pre.beta1 lib/phobos/batch_message.rb
phobos-1.8.2 lib/phobos/batch_message.rb
phobos-1.8.2.pre.beta2 lib/phobos/batch_message.rb
phobos-1.8.2.pre.beta1 lib/phobos/batch_message.rb