Module: Sbmt::Pact::Provider::PactConfig
- Defined in:
- lib/sbmt/pact/provider/pact_config.rb,
lib/sbmt/pact/provider/pact_config/base.rb,
lib/sbmt/pact/provider/pact_config/grpc.rb,
lib/sbmt/pact/provider/pact_config/http.rb,
lib/sbmt/pact/provider/pact_config/async.rb
Defined Under Namespace
Classes: Async, Base, Grpc, Http
Class Method Summary collapse
Class Method Details
.new(transport_type, provider_name:, opts: {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/sbmt/pact/provider/pact_config.rb', line 9 def self.new(transport_type, provider_name:, opts: {}) case transport_type when :http Http.new(provider_name: provider_name, opts: opts) when :grpc Grpc.new(provider_name: provider_name, opts: opts) when :async Async.new(provider_name: provider_name, opts: opts) else raise ArgumentError, "unknown transport_type: #{transport_type}" end end |