Class: Pact::Consumer::InteractionDelete
- Inherits:
-
MockServiceAdministrationEndpoint
- Object
- MockServiceAdministrationEndpoint
- Pact::Consumer::InteractionDelete
- Includes:
- RackRequestHelper
- Defined in:
- lib/pact/consumer/mock_service/interaction_delete.rb
Constant Summary
Constants included from RackRequestHelper
RackRequestHelper::REQUEST_KEYS
Instance Attribute Summary collapse
-
#interaction_list ⇒ Object
Returns the value of attribute interaction_list.
Attributes inherited from MockServiceAdministrationEndpoint
Instance Method Summary collapse
-
#initialize(name, logger, interaction_list) ⇒ InteractionDelete
constructor
A new instance of InteractionDelete.
- #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) ⇒ InteractionDelete
Returns a new instance of InteractionDelete.
13 14 15 16 |
# File 'lib/pact/consumer/mock_service/interaction_delete.rb', line 13 def initialize name, logger, interaction_list super name, logger @interaction_list = interaction_list end |
Instance Attribute Details
#interaction_list ⇒ Object
Returns the value of attribute interaction_list.
11 12 13 |
# File 'lib/pact/consumer/mock_service/interaction_delete.rb', line 11 def interaction_list @interaction_list end |
Instance Method Details
#request_method ⇒ Object
22 23 24 |
# File 'lib/pact/consumer/mock_service/interaction_delete.rb', line 22 def request_method 'DELETE' end |
#request_path ⇒ Object
18 19 20 |
# File 'lib/pact/consumer/mock_service/interaction_delete.rb', line 18 def request_path '/interactions' end |
#respond(env) ⇒ Object
26 27 28 29 30 |
# File 'lib/pact/consumer/mock_service/interaction_delete.rb', line 26 def respond env interaction_list.clear logger.info "Cleared interactions before example \"#{params_hash(env)['example_description']}\"" [200, {}, ['Deleted interactions']] end |