Class: Phobos::BatchMessage
- Inherits:
-
Object
- Object
- Phobos::BatchMessage
- Defined in:
- lib/phobos/batch_message.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
Constructor Details
#initialize(key:, partition:, offset:, payload:, headers:) ⇒ void
22 23 24 25 26 27 28 |
# File 'lib/phobos/batch_message.rb', line 22 def initialize(key:, partition:, offset:, payload:, headers:) @key = key @partition = partition @offset = offset @payload = payload @headers = headers end |
Instance Attribute Details
#headers ⇒ Object
14 15 16 |
# File 'lib/phobos/batch_message.rb', line 14 def headers @headers end |
#key ⇒ Object
6 7 8 |
# File 'lib/phobos/batch_message.rb', line 6 def key @key end |
#offset ⇒ Integer
10 11 12 |
# File 'lib/phobos/batch_message.rb', line 10 def offset @offset end |
#partition ⇒ Integer
8 9 10 |
# File 'lib/phobos/batch_message.rb', line 8 def partition @partition end |
#payload ⇒ Object
12 13 14 |
# File 'lib/phobos/batch_message.rb', line 12 def payload @payload end |
Instance Method Details
#==(other) ⇒ Boolean
32 33 34 35 36 |
# File 'lib/phobos/batch_message.rb', line 32 def ==(other) [:key, :partition, :offset, :payload, :headers].all? do |s| public_send(s) == other.public_send(s) end end |