Class: Protobuf::Rpc::ServiceDispatcher

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/protobuf/rpc/service_dispatcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Logging

initialize_logger, #log_exception, #log_signature, #logger, #sign_message

Constructor Details

#initialize(_app) ⇒ ServiceDispatcher

Returns a new instance of ServiceDispatcher.



10
11
12
# File 'lib/protobuf/rpc/service_dispatcher.rb', line 10

def initialize(_app)
  # End of the line...
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env.



8
9
10
# File 'lib/protobuf/rpc/service_dispatcher.rb', line 8

def env
  @env
end

Instance Method Details

#_call(env) ⇒ Object



18
19
20
21
22
23
# File 'lib/protobuf/rpc/service_dispatcher.rb', line 18

def _call(env)
  @env = env

  env.response = dispatch_rpc_request
  env
end

#call(env) ⇒ Object



14
15
16
# File 'lib/protobuf/rpc/service_dispatcher.rb', line 14

def call(env)
  dup._call(env)
end

#rpc_serviceObject



25
26
27
# File 'lib/protobuf/rpc/service_dispatcher.rb', line 25

def rpc_service
  @rpc_service ||= env.rpc_service.new(env)
end