Class: Pact::MockService::RequestHandlers::LogGet
- Inherits:
-
BaseAdministrationRequestHandler
- Object
- BaseRequestHandler
- BaseAdministrationRequestHandler
- Pact::MockService::RequestHandlers::LogGet
- Defined in:
- lib/pact/mock_service/request_handlers/log_get.rb
Constant Summary
Constants inherited from BaseRequestHandler
BaseRequestHandler::NOT_FOUND_RESPONSE
Constants included from Consumer::RackRequestHelper
Consumer::RackRequestHelper::REQUEST_KEYS
Instance Attribute Summary
Attributes inherited from BaseAdministrationRequestHandler
Instance Method Summary collapse
Methods inherited from BaseAdministrationRequestHandler
#has_mock_service_header?, #initialize, #match?, #method_matches?, #path_matches?
Methods inherited from BaseRequestHandler
#call, #json_response, #match?, #text_response
Methods included from Consumer::RackRequestHelper
#params_hash, #request_as_hash_from
Constructor Details
This class inherits a constructor from Pact::MockService::RequestHandlers::BaseAdministrationRequestHandler
Instance Method Details
#message(env) ⇒ Object
21 22 23 |
# File 'lib/pact/mock_service/request_handlers/log_get.rb', line 21 def env params_hash(env).fetch('msg', [])[0] end |
#request_method ⇒ Object
12 13 14 |
# File 'lib/pact/mock_service/request_handlers/log_get.rb', line 12 def request_method 'GET' end |
#request_path ⇒ Object
8 9 10 |
# File 'lib/pact/mock_service/request_handlers/log_get.rb', line 8 def request_path '/log' end |
#respond(env) ⇒ Object
16 17 18 19 |
# File 'lib/pact/mock_service/request_handlers/log_get.rb', line 16 def respond env logger.info "Debug message from client - #{(env)}" text_response end |