Class: Sbmt::Pact::Consumer::PactConfig::Base

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

Direct Known Subclasses

Grpc, Http, Message

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Base.



10
11
12
13
14
15
# File 'lib/sbmt/pact/consumer/pact_config/base.rb', line 10

def initialize(consumer_name:, provider_name:, opts: {})
  @consumer_name = consumer_name
  @provider_name = provider_name
  @pact_dir = opts[:pact_dir] || Rails.root.join("pacts").to_s
  @log_level = opts[:log_level] || :info
end

Instance Attribute Details

#consumer_nameObject (readonly)

Returns the value of attribute consumer_name.



8
9
10
# File 'lib/sbmt/pact/consumer/pact_config/base.rb', line 8

def consumer_name
  @consumer_name
end

#log_levelObject (readonly)

Returns the value of attribute log_level.



8
9
10
# File 'lib/sbmt/pact/consumer/pact_config/base.rb', line 8

def log_level
  @log_level
end

#pact_dirObject (readonly)

Returns the value of attribute pact_dir.



8
9
10
# File 'lib/sbmt/pact/consumer/pact_config/base.rb', line 8

def pact_dir
  @pact_dir
end

#provider_nameObject (readonly)

Returns the value of attribute provider_name.



8
9
10
# File 'lib/sbmt/pact/consumer/pact_config/base.rb', line 8

def provider_name
  @provider_name
end

Instance Method Details

#new_interaction(description = nil) ⇒ Object



17
18
19
# File 'lib/sbmt/pact/consumer/pact_config/base.rb', line 17

def new_interaction(description = nil)
  raise Sbmt::Pact::ImplementationRequired, "#new_interaction should be implemented"
end