Class: EventHookClientServer::Server::RequestProcessor
- Inherits:
-
EventHookClientServer::Service
- Object
- EventHookClientServer::Service
- EventHookClientServer::Server::RequestProcessor
- Defined in:
- lib/event_hook_client_server/server/request_processor.rb
Instance Attribute Summary collapse
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(method, input, request, handler, logger) ⇒ RequestProcessor
constructor
A new instance of RequestProcessor.
Methods inherited from EventHookClientServer::Service
Constructor Details
#initialize(method, input, request, handler, logger) ⇒ RequestProcessor
Returns a new instance of RequestProcessor.
17 18 19 20 21 22 23 24 |
# File 'lib/event_hook_client_server/server/request_processor.rb', line 17 def initialize(method, input, request, handler, logger) @method = method @input = input @request = request @handler = handler @logger = logger @id = SecureRandom.uuid end |
Instance Attribute Details
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
13 14 15 |
# File 'lib/event_hook_client_server/server/request_processor.rb', line 13 def handler @handler end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
15 16 17 |
# File 'lib/event_hook_client_server/server/request_processor.rb', line 15 def id @id end |
#input ⇒ Object (readonly)
Returns the value of attribute input.
11 12 13 |
# File 'lib/event_hook_client_server/server/request_processor.rb', line 11 def input @input end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
14 15 16 |
# File 'lib/event_hook_client_server/server/request_processor.rb', line 14 def logger @logger end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
10 11 12 |
# File 'lib/event_hook_client_server/server/request_processor.rb', line 10 def method @method end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
12 13 14 |
# File 'lib/event_hook_client_server/server/request_processor.rb', line 12 def request @request end |
Instance Method Details
#call ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/event_hook_client_server/server/request_processor.rb', line 26 def call start_timer! log_start result = handler.call(input, request) log_end result end |