Module: Messaging::Message::Transform

Defined in:
lib/messaging/message/transform.rb

Defined Under Namespace

Modules: MessageData

Class Method Summary collapse

Class Method Details

.instance(message_data_data, cls) ⇒ Object



12
13
14
15
16
# File 'lib/messaging/message/transform.rb', line 12

def self.instance(message_data_data, cls)
  instance = cls.build(message_data_data[:data], message_data_data[:metadata])
  instance.id = message_data_data[:id]
  instance
end

.message_dataObject



4
5
6
# File 'lib/messaging/message/transform.rb', line 4

def self.message_data
  MessageData
end

.raw_data(message) ⇒ Object



8
9
10
# File 'lib/messaging/message/transform.rb', line 8

def self.raw_data(message)
  message
end