Class: Fake::Kafka::Message
- Inherits:
-
Object
- Object
- Fake::Kafka::Message
- Defined in:
- lib/fake/kafka/message.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#partition ⇒ Object
readonly
Returns the value of attribute partition.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
Instance Method Summary collapse
-
#initialize(value, key, topic, partition, offset) ⇒ Message
constructor
A new instance of Message.
- #value ⇒ Object
Constructor Details
#initialize(value, key, topic, partition, offset) ⇒ Message
Returns a new instance of Message.
3 4 5 6 7 8 9 |
# File 'lib/fake/kafka/message.rb', line 3 def initialize(value, key, topic, partition, offset) @value = value @key = key @topic = topic @partition = partition @offset = offset end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
2 3 4 |
# File 'lib/fake/kafka/message.rb', line 2 def key @key end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
2 3 4 |
# File 'lib/fake/kafka/message.rb', line 2 def offset @offset end |
#partition ⇒ Object (readonly)
Returns the value of attribute partition.
2 3 4 |
# File 'lib/fake/kafka/message.rb', line 2 def partition @partition end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
2 3 4 |
# File 'lib/fake/kafka/message.rb', line 2 def topic @topic end |
Instance Method Details
#value ⇒ Object
11 12 13 |
# File 'lib/fake/kafka/message.rb', line 11 def value @value.to_json end |