Class: Sbmt::Pact::Consumer::PactConfig::Grpc

Inherits:
Base
  • Object
show all
Defined in:
lib/sbmt/pact/consumer/pact_config/grpc.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#consumer_name, #log_level, #pact_dir, #provider_name

Instance Method Summary collapse

Constructor Details

#initialize(consumer_name:, provider_name:, opts: {}) ⇒ Grpc

Returns a new instance of Grpc.



12
13
14
15
16
17
# File 'lib/sbmt/pact/consumer/pact_config/grpc.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] || 3009
end

Instance Attribute Details

#mock_hostObject (readonly)

Returns the value of attribute mock_host.



10
11
12
# File 'lib/sbmt/pact/consumer/pact_config/grpc.rb', line 10

def mock_host
  @mock_host
end

#mock_portObject (readonly)

Returns the value of attribute mock_port.



10
11
12
# File 'lib/sbmt/pact/consumer/pact_config/grpc.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/grpc.rb', line 19

def new_interaction(description = nil)
  GrpcInteractionBuilder.new(self, description: description)
end