Class: PactBroker::Contracts::ContractToPublish
- Inherits:
-
Struct
- Object
- Struct
- PactBroker::Contracts::ContractToPublish
- Defined in:
- lib/pact_broker/contracts/contract_to_publish.rb
Instance Attribute Summary collapse
-
#consumer_name ⇒ Object
Returns the value of attribute consumer_name.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#decoded_content ⇒ Object
Returns the value of attribute decoded_content.
-
#on_conflict ⇒ Object
Returns the value of attribute on_conflict.
-
#pact_version_sha ⇒ Object
Returns the value of attribute pact_version_sha.
-
#provider_name ⇒ Object
Returns the value of attribute provider_name.
-
#specification ⇒ Object
Returns the value of attribute specification.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#consumer_name ⇒ Object
Returns the value of attribute consumer_name
3 4 5 |
# File 'lib/pact_broker/contracts/contract_to_publish.rb', line 3 def consumer_name @consumer_name end |
#content_type ⇒ Object
Returns the value of attribute content_type
3 4 5 |
# File 'lib/pact_broker/contracts/contract_to_publish.rb', line 3 def content_type @content_type end |
#decoded_content ⇒ Object
Returns the value of attribute decoded_content
3 4 5 |
# File 'lib/pact_broker/contracts/contract_to_publish.rb', line 3 def decoded_content @decoded_content end |
#on_conflict ⇒ Object
Returns the value of attribute on_conflict
3 4 5 |
# File 'lib/pact_broker/contracts/contract_to_publish.rb', line 3 def on_conflict @on_conflict end |
#pact_version_sha ⇒ Object
Returns the value of attribute pact_version_sha
3 4 5 |
# File 'lib/pact_broker/contracts/contract_to_publish.rb', line 3 def pact_version_sha @pact_version_sha end |
#provider_name ⇒ Object
Returns the value of attribute provider_name
3 4 5 |
# File 'lib/pact_broker/contracts/contract_to_publish.rb', line 3 def provider_name @provider_name end |
#specification ⇒ Object
Returns the value of attribute specification
3 4 5 |
# File 'lib/pact_broker/contracts/contract_to_publish.rb', line 3 def specification @specification end |
Class Method Details
.from_hash(hash) ⇒ Object
5 6 7 |
# File 'lib/pact_broker/contracts/contract_to_publish.rb', line 5 def self.from_hash(hash) new(**hash) end |
Instance Method Details
#merge? ⇒ Boolean
13 14 15 |
# File 'lib/pact_broker/contracts/contract_to_publish.rb', line 13 def merge? on_conflict == "merge" end |
#pact? ⇒ Boolean
9 10 11 |
# File 'lib/pact_broker/contracts/contract_to_publish.rb', line 9 def pact? specification == "pact" end |
#pacticipant_names ⇒ Object
17 18 19 |
# File 'lib/pact_broker/contracts/contract_to_publish.rb', line 17 def pacticipant_names [consumer_name, provider_name] end |