Class: Sbmt::Pact::Consumer::PactConfig::Http
- Defined in:
- lib/sbmt/pact/consumer/pact_config/http.rb
Instance Attribute Summary collapse
-
#mock_host ⇒ Object
readonly
Returns the value of attribute mock_host.
-
#mock_port ⇒ Object
readonly
Returns the value of attribute mock_port.
Attributes inherited from Base
#consumer_name, #log_level, #pact_dir, #provider_name
Instance Method Summary collapse
-
#initialize(consumer_name:, provider_name:, opts: {}) ⇒ Http
constructor
A new instance of Http.
- #new_interaction(description = nil) ⇒ Object
Constructor Details
#initialize(consumer_name:, provider_name:, opts: {}) ⇒ Http
Returns a new instance of Http.
12 13 14 15 16 17 |
# File 'lib/sbmt/pact/consumer/pact_config/http.rb', line 12 def initialize(consumer_name:, provider_name:, opts: {}) super @mock_host = opts[:mock_host] || "127.0.0.1" @mock_port = opts[:mock_port] || 3000 end |
Instance Attribute Details
#mock_host ⇒ Object (readonly)
Returns the value of attribute mock_host.
10 11 12 |
# File 'lib/sbmt/pact/consumer/pact_config/http.rb', line 10 def mock_host @mock_host end |
#mock_port ⇒ Object (readonly)
Returns the value of attribute mock_port.
10 11 12 |
# File 'lib/sbmt/pact/consumer/pact_config/http.rb', line 10 def mock_port @mock_port end |
Instance Method Details
#new_interaction(description = nil) ⇒ Object
19 20 21 |
# File 'lib/sbmt/pact/consumer/pact_config/http.rb', line 19 def new_interaction(description = nil) HttpInteractionBuilder.new(self, description: description) end |