Class: Pact::MockService::RequestHandlers::IndexGet

Inherits:
BaseAdministrationRequestHandler show all
Defined in:
lib/pact/mock_service/request_handlers/index_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

#logger, #name

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

#request_methodObject



13
14
15
# File 'lib/pact/mock_service/request_handlers/index_get.rb', line 13

def request_method
  'GET'
end

#request_pathObject



9
10
11
# File 'lib/pact/mock_service/request_handlers/index_get.rb', line 9

def request_path
  ''
end

#respond(env) ⇒ Object



17
18
19
# File 'lib/pact/mock_service/request_handlers/index_get.rb', line 17

def respond env
  text_response('Mock service running')
end