Class: Pact::Consumer::LogGet

Inherits:
MockServiceAdministrationEndpoint show all
Includes:
RackRequestHelper
Defined in:
lib/pact/consumer/mock_service/log_get.rb

Constant Summary

Constants included from RackRequestHelper

RackRequestHelper::REQUEST_KEYS

Instance Attribute Summary

Attributes inherited from MockServiceAdministrationEndpoint

#logger, #name

Instance Method Summary collapse

Methods included from RackRequestHelper

#params_hash, #request_as_hash_from

Methods inherited from MockServiceAdministrationEndpoint

#initialize, #match?

Constructor Details

This class inherits a constructor from Pact::Consumer::MockServiceAdministrationEndpoint

Instance Method Details

#message(env) ⇒ Object



23
24
25
# File 'lib/pact/consumer/mock_service/log_get.rb', line 23

def message env
  params_hash(env)['msg']
end

#request_methodObject



13
14
15
# File 'lib/pact/consumer/mock_service/log_get.rb', line 13

def request_method
  'GET'
end

#request_pathObject



9
10
11
# File 'lib/pact/consumer/mock_service/log_get.rb', line 9

def request_path
  '/log'
end

#respond(env) ⇒ Object



18
19
20
21
# File 'lib/pact/consumer/mock_service/log_get.rb', line 18

def respond env
  logger.info "Debug message from client - #{message(env)}"
  [200, {}, []]
end