Class: WireMockMapper::Configuration
- Inherits:
-
Object
- Object
- WireMockMapper::Configuration
- Defined in:
- lib/configuration.rb
Class Attribute Summary collapse
-
.request_builder ⇒ Object
readonly
Returns the value of attribute request_builder.
-
.response_builder ⇒ Object
readonly
Returns the value of attribute response_builder.
-
.scenario_builder ⇒ Object
readonly
Returns the value of attribute scenario_builder.
-
.wiremock_headers ⇒ Object
readonly
Returns the value of attribute wiremock_headers.
-
.wiremock_url ⇒ Object
readonly
Returns the value of attribute wiremock_url.
Class Method Summary collapse
-
.create_global_mapping {|@request_builder, @response_builder, @scenario_builder| ... } ⇒ Object
Add mappings to include for all future mappings.
- .reset_global_mappings ⇒ Object
-
.set_wiremock_headers(headers) ⇒ Object
Set the WireMock headers.
-
.set_wiremock_url(url) ⇒ Object
Set the WireMock url.
Class Attribute Details
.request_builder ⇒ Object (readonly)
Returns the value of attribute request_builder.
15 16 17 |
# File 'lib/configuration.rb', line 15 def request_builder @request_builder end |
.response_builder ⇒ Object (readonly)
Returns the value of attribute response_builder.
15 16 17 |
# File 'lib/configuration.rb', line 15 def response_builder @response_builder end |
.scenario_builder ⇒ Object (readonly)
Returns the value of attribute scenario_builder.
15 16 17 |
# File 'lib/configuration.rb', line 15 def scenario_builder @scenario_builder end |
.wiremock_headers ⇒ Object (readonly)
Returns the value of attribute wiremock_headers.
15 16 17 |
# File 'lib/configuration.rb', line 15 def wiremock_headers @wiremock_headers end |
.wiremock_url ⇒ Object (readonly)
Returns the value of attribute wiremock_url.
15 16 17 |
# File 'lib/configuration.rb', line 15 def wiremock_url @wiremock_url end |
Class Method Details
.create_global_mapping {|@request_builder, @response_builder, @scenario_builder| ... } ⇒ Object
Add mappings to include for all future mappings
18 19 20 |
# File 'lib/configuration.rb', line 18 def create_global_mapping yield @request_builder, @response_builder, @scenario_builder end |
.reset_global_mappings ⇒ Object
22 23 24 25 26 |
# File 'lib/configuration.rb', line 22 def reset_global_mappings @request_builder = Builders::RequestBuilder.new @response_builder = Builders::ResponseBuilder.new @scenario_builder = Builders::ScenarioBuilder.new end |
.set_wiremock_headers(headers) ⇒ Object
Set the WireMock headers
36 37 38 |
# File 'lib/configuration.rb', line 36 def set_wiremock_headers(headers) @wiremock_headers = headers end |
.set_wiremock_url(url) ⇒ Object
Set the WireMock url
30 31 32 |
# File 'lib/configuration.rb', line 30 def set_wiremock_url(url) @wiremock_url = url end |