class Async::Bus::Protocol::Wrapper
Public Class Methods
new(bus)
click to toggle source
Calls superclass method
# File lib/async/bus/protocol/wrapper.rb, line 29 def initialize(bus) super() @bus = bus self.register_type(0x00, Object, packer: @bus.method(:proxy), unpacker: @bus.method(:[]) ) self.register_type(0x01, Symbol) self.register_type(0x02, Exception, packer: ->(exception){Marshal.dump(exception)}, unpacker: ->(data){Marshal.load(data)}, ) self.register_type(0x03, Class, packer: ->(klass){Marshal.dump(klass)}, unpacker: ->(data){Marshal.load(data)}, ) end