Module: Envoy::Protocol

Includes:
EM::P::ObjectProtocol
Included in:
Client::Trunk, Server::Trunk
Defined in:
lib/envoy/protocol.rb

Defined Under Namespace

Modules: Serializer

Constant Summary collapse

VERBOSITIES =
%w"FATAL ERROR WARN\  INFO\  DEBUG TRACE"

Instance Method Summary collapse

Instance Method Details

#receive_object(command, *args) ⇒ Object



39
40
41
# File 'lib/envoy/protocol.rb', line 39

def receive_object ((command, *args))
  __send__("receive_#{command}", *args)
end

#send_object(*args) ⇒ Object



35
36
37
# File 'lib/envoy/protocol.rb', line 35

def send_object *args
  super(args.size > 1 ? BERT::Tuple[*args] : args[0])
end

#serializerObject



31
32
33
# File 'lib/envoy/protocol.rb', line 31

def serializer
  Serializer
end

#verbosityObject



18
19
20
# File 'lib/envoy/protocol.rb', line 18

def verbosity
  @verbosity ||= [FATAL, [TRACE, @options[:verbosity] || 3].min].max
end