Class: Sbmt::Pact::Consumer::PactConfig::Base
- Inherits:
-
Object
- Object
- Sbmt::Pact::Consumer::PactConfig::Base
- Defined in:
- lib/sbmt/pact/consumer/pact_config/base.rb
Instance Attribute Summary collapse
-
#consumer_name ⇒ Object
readonly
Returns the value of attribute consumer_name.
-
#log_level ⇒ Object
readonly
Returns the value of attribute log_level.
-
#pact_dir ⇒ Object
readonly
Returns the value of attribute pact_dir.
-
#provider_name ⇒ Object
readonly
Returns the value of attribute provider_name.
Instance Method Summary collapse
-
#initialize(consumer_name:, provider_name:, opts: {}) ⇒ Base
constructor
A new instance of Base.
- #new_interaction(description = nil) ⇒ Object
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_name ⇒ Object (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_level ⇒ Object (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_dir ⇒ Object (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_name ⇒ Object (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 |