Class: Pheme::MessageHandler
- Inherits:
-
Object
- Object
- Pheme::MessageHandler
- Defined in:
- lib/pheme/message_handler.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#message_attributes ⇒ Object
readonly
Returns the value of attribute message_attributes.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #handle ⇒ Object
-
#initialize(message:, metadata: {}, message_attributes: {}) ⇒ MessageHandler
constructor
A new instance of MessageHandler.
Constructor Details
#initialize(message:, metadata: {}, message_attributes: {}) ⇒ MessageHandler
Returns a new instance of MessageHandler.
5 6 7 8 9 |
# File 'lib/pheme/message_handler.rb', line 5 def initialize(message:, metadata: {}, message_attributes: {}) @message = @metadata = @message_attributes = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/pheme/message_handler.rb', line 3 def @message end |
#message_attributes ⇒ Object (readonly)
Returns the value of attribute message_attributes.
3 4 5 |
# File 'lib/pheme/message_handler.rb', line 3 def @message_attributes end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
3 4 5 |
# File 'lib/pheme/message_handler.rb', line 3 def @metadata end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/pheme/message_handler.rb', line 3 def @timestamp end |
Instance Method Details
#handle ⇒ Object
11 12 13 |
# File 'lib/pheme/message_handler.rb', line 11 def handle raise NotImplementedError end |