Class: Pact::Consumer::MissingInteractionsGet
- Inherits:
-
MockServiceAdministrationEndpoint
- Object
- MockServiceAdministrationEndpoint
- Pact::Consumer::MissingInteractionsGet
- Includes:
- RackRequestHelper
- Defined in:
- lib/pact/consumer/mock_service/missing_interactions_get.rb
Constant Summary
Constants included from RackRequestHelper
RackRequestHelper::REQUEST_KEYS
Instance Attribute Summary
Attributes inherited from MockServiceAdministrationEndpoint
Instance Method Summary collapse
-
#initialize(name, logger, interaction_list) ⇒ MissingInteractionsGet
constructor
A new instance of MissingInteractionsGet.
- #request_method ⇒ Object
- #request_path ⇒ Object
- #respond(env) ⇒ Object
Methods included from RackRequestHelper
#params_hash, #request_as_hash_from
Methods inherited from MockServiceAdministrationEndpoint
Constructor Details
#initialize(name, logger, interaction_list) ⇒ MissingInteractionsGet
Returns a new instance of MissingInteractionsGet.
9 10 11 12 |
# File 'lib/pact/consumer/mock_service/missing_interactions_get.rb', line 9 def initialize name, logger, interaction_list super name, logger @interaction_list = interaction_list end |
Instance Method Details
#request_method ⇒ Object
18 19 20 |
# File 'lib/pact/consumer/mock_service/missing_interactions_get.rb', line 18 def request_method 'GET' end |
#request_path ⇒ Object
14 15 16 |
# File 'lib/pact/consumer/mock_service/missing_interactions_get.rb', line 14 def request_path '/number_of_missing_interactions' end |
#respond(env) ⇒ Object
22 23 24 25 26 |
# File 'lib/pact/consumer/mock_service/missing_interactions_get.rb', line 22 def respond env number_of_missing_interactions = @interaction_list.missing_interactions.size logger.info "Number of missing interactions for mock \"#{name}\" = #{number_of_missing_interactions}" [200, {}, ["#{number_of_missing_interactions}"]] end |