Class: Pact::Consumer::PactConfig::Base
- Inherits:
-
Object
- Object
- Pact::Consumer::PactConfig::Base
- Defined in:
- lib/pact/consumer/pact_config/base.rb
Direct Known Subclasses
Grpc, Http, Message, PluginAsyncMessage, PluginHttp, PluginSyncMessage
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.
9 10 11 12 13 14 |
# File 'lib/pact/consumer/pact_config/base.rb', line 9 def initialize(consumer_name:, provider_name:, opts: {}) @consumer_name = consumer_name @provider_name = provider_name @pact_dir = opts[:pact_dir] || (defined?(Rails) ? Rails.root.join("../pacts").to_s : "pacts") @log_level = opts[:log_level] || :info end |
Instance Attribute Details
#consumer_name ⇒ Object (readonly)
Returns the value of attribute consumer_name.
7 8 9 |
# File 'lib/pact/consumer/pact_config/base.rb', line 7 def consumer_name @consumer_name end |
#log_level ⇒ Object (readonly)
Returns the value of attribute log_level.
7 8 9 |
# File 'lib/pact/consumer/pact_config/base.rb', line 7 def log_level @log_level end |
#pact_dir ⇒ Object (readonly)
Returns the value of attribute pact_dir.
7 8 9 |
# File 'lib/pact/consumer/pact_config/base.rb', line 7 def pact_dir @pact_dir end |
#provider_name ⇒ Object (readonly)
Returns the value of attribute provider_name.
7 8 9 |
# File 'lib/pact/consumer/pact_config/base.rb', line 7 def provider_name @provider_name end |
Instance Method Details
#new_interaction(description = nil) ⇒ Object
16 17 18 |
# File 'lib/pact/consumer/pact_config/base.rb', line 16 def new_interaction(description = nil) raise PactImplementationRequired, "#new_interaction should be implemented" end |