Class: Pheme::MessageHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/pheme/message_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = message
  @metadata = 
  @message_attributes = message_attributes
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'lib/pheme/message_handler.rb', line 3

def message
  @message
end

#message_attributesObject (readonly)

Returns the value of attribute message_attributes.



3
4
5
# File 'lib/pheme/message_handler.rb', line 3

def message_attributes
  @message_attributes
end

#metadataObject (readonly)

Returns the value of attribute metadata.



3
4
5
# File 'lib/pheme/message_handler.rb', line 3

def 
  @metadata
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



3
4
5
# File 'lib/pheme/message_handler.rb', line 3

def timestamp
  @timestamp
end

Instance Method Details

#handleObject

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/pheme/message_handler.rb', line 11

def handle
  raise NotImplementedError
end