Class: Phobos::BatchMessage
- Inherits:
-
Object
- Object
- Phobos::BatchMessage
- Defined in:
- lib/phobos/batch_message.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#key ⇒ Object
Returns the value of attribute key.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#partition ⇒ Object
Returns the value of attribute partition.
-
#payload ⇒ Object
Returns the value of attribute payload.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(key:, partition:, offset:, payload:, headers:) ⇒ BatchMessage
constructor
A new instance of BatchMessage.
Constructor Details
#initialize(key:, partition:, offset:, payload:, headers:) ⇒ BatchMessage
Returns a new instance of BatchMessage.
7 8 9 10 11 12 13 |
# File 'lib/phobos/batch_message.rb', line 7 def initialize(key:, partition:, offset:, payload:, headers:) @key = key @partition = partition @offset = offset @payload = payload @headers = headers end |
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
5 6 7 |
# File 'lib/phobos/batch_message.rb', line 5 def headers @headers end |
#key ⇒ Object
Returns the value of attribute key.
5 6 7 |
# File 'lib/phobos/batch_message.rb', line 5 def key @key end |
#offset ⇒ Object
Returns the value of attribute offset.
5 6 7 |
# File 'lib/phobos/batch_message.rb', line 5 def offset @offset end |
#partition ⇒ Object
Returns the value of attribute partition.
5 6 7 |
# File 'lib/phobos/batch_message.rb', line 5 def partition @partition end |
#payload ⇒ Object
Returns the value of attribute payload.
5 6 7 |
# File 'lib/phobos/batch_message.rb', line 5 def payload @payload end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 18 19 |
# File 'lib/phobos/batch_message.rb', line 15 def ==(other) [:key, :partition, :offset, :payload, :headers].all? do |s| public_send(s) == other.public_send(s) end end |