Class: Protobuf::Rpc::ServiceDispatcher
- Inherits:
-
Object
- Object
- Protobuf::Rpc::ServiceDispatcher
- Includes:
- Logging
- Defined in:
- lib/protobuf/rpc/service_dispatcher.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(_app) ⇒ ServiceDispatcher
constructor
A new instance of ServiceDispatcher.
- #rpc_service ⇒ Object
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
#env ⇒ Object (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
14 15 16 17 18 19 |
# File 'lib/protobuf/rpc/service_dispatcher.rb', line 14 def call(env) @env = env env.response = dispatch_rpc_request env end |
#rpc_service ⇒ Object
21 22 23 |
# File 'lib/protobuf/rpc/service_dispatcher.rb', line 21 def rpc_service @rpc_service ||= env.rpc_service.new(env) end |