Class: KyotoTycoon::Serializer::Msgpack

Inherits:
Object
  • Object
show all
Defined in:
lib/kyototycoon/serializer/msgpack.rb

Class Method Summary collapse

Class Method Details

.decode(str) ⇒ Object



16
17
18
# File 'lib/kyototycoon/serializer/msgpack.rb', line 16

def self.decode(str)
  MessagePack.unpack(str) if str
end

.encode(obj) ⇒ Object



12
13
14
# File 'lib/kyototycoon/serializer/msgpack.rb', line 12

def self.encode(obj)
  obj.to_msgpack
end