Class: AmqpUtils::Serialization::MsgPack

Inherits:
Base
  • Object
show all
Defined in:
lib/amqp_utils/serialization.rb

Class Method Summary collapse

Methods inherited from Base

content_type

Class Method Details

.deserialize(message) ⇒ Object



33
34
35
36
# File 'lib/amqp_utils/serialization.rb', line 33

def self.deserialize(message)
  require 'msgpack'
  MessagePack.unpack(message)
end

.serialize(message) ⇒ Object



38
39
40
41
# File 'lib/amqp_utils/serialization.rb', line 38

def self.serialize(message)
  require 'msgpack'
  message.to_msgpack
end