Class: Wampproto::Serializer::Cbor
- Inherits:
-
Object
- Object
- Wampproto::Serializer::Cbor
- Defined in:
- lib/wampproto/serializer/cbor.rb
Overview
Add common API for serializer
Class Method Summary collapse
Class Method Details
.deserialize(message) ⇒ Object
13 14 15 |
# File 'lib/wampproto/serializer/cbor.rb', line 13 def self.deserialize() CBOR.decode(.pack("c*")).then { Message.resolve(_1) } end |
.serialize(message) ⇒ Object
9 10 11 |
# File 'lib/wampproto/serializer/cbor.rb', line 9 def self.serialize() CBOR.encode(.marshal).unpack("c*") end |