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
- #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
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_service ⇒ Object
25 26 27 |
# File 'lib/protobuf/rpc/service_dispatcher.rb', line 25 def rpc_service @rpc_service ||= env.rpc_service.new(env) end |