Class: PactBroker::Pacts::HeadPact
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- PactBroker::Pacts::HeadPact
- Defined in:
- lib/pact_broker/pacts/head_pact.rb
Instance Attribute Summary collapse
-
#consumer_version_number ⇒ Object
readonly
Returns the value of attribute consumer_version_number.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(pact, consumer_version_number, tag) ⇒ HeadPact
constructor
A new instance of HeadPact.
-
#overall_latest? ⇒ Boolean
The underlying pact publication may well be the overall latest as well, but this row does not know that, as there will be a row with a nil tag if it is the overall latest as well as a row with the tag set, as the data is denormalised in the LatestTaggedPactPublications table.
- #pact ⇒ Object
Constructor Details
#initialize(pact, consumer_version_number, tag) ⇒ HeadPact
Returns a new instance of HeadPact.
11 12 13 14 15 |
# File 'lib/pact_broker/pacts/head_pact.rb', line 11 def initialize(pact, consumer_version_number, tag) super(pact) @consumer_version_number = consumer_version_number @tag = tag end |
Instance Attribute Details
#consumer_version_number ⇒ Object (readonly)
Returns the value of attribute consumer_version_number.
9 10 11 |
# File 'lib/pact_broker/pacts/head_pact.rb', line 9 def consumer_version_number @consumer_version_number end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
9 10 11 |
# File 'lib/pact_broker/pacts/head_pact.rb', line 9 def tag @tag end |
Instance Method Details
#overall_latest? ⇒ Boolean
The underlying pact publication may well be the overall latest as well, but this row does not know that, as there will be a row with a nil tag if it is the overall latest as well as a row with the tag set, as the data is denormalised in the LatestTaggedPactPublications table.
21 22 23 |
# File 'lib/pact_broker/pacts/head_pact.rb', line 21 def overall_latest? tag.nil? end |
#pact ⇒ Object
25 26 27 |
# File 'lib/pact_broker/pacts/head_pact.rb', line 25 def pact __getobj__() end |