Class: PactBroker::Pacts::Diff::DiffDecorator
- Inherits:
-
Object
- Object
- PactBroker::Pacts::Diff::DiffDecorator
- Defined in:
- lib/pact_broker/pacts/diff.rb
Overview
The next pact version after the previous distinct version. Eg. v1 (previous distinct) -> pactContentA
v2 (next pact) -> pactContentB
v3 -> pactContentB
v4 (current) -> pactContentB
If we are at v4, then the previous distinct pact version is v1, and the next pact after that is v2. The timestamps on v2 are the ones we want - that’s when the latest distinct version content was first created.
Instance Method Summary collapse
-
#initialize(pact, comparison_pact, next_pact, base_url, options) ⇒ DiffDecorator
constructor
A new instance of DiffDecorator.
- #to_text ⇒ Object
Constructor Details
#initialize(pact, comparison_pact, next_pact, base_url, options) ⇒ DiffDecorator
Returns a new instance of DiffDecorator.
51 52 53 54 55 56 57 |
# File 'lib/pact_broker/pacts/diff.rb', line 51 def initialize(pact, comparison_pact, next_pact, base_url, ) @pact = pact @comparison_pact = comparison_pact @next_pact = next_pact @base_url = base_url @options = end |
Instance Method Details
#to_text ⇒ Object
59 60 61 |
# File 'lib/pact_broker/pacts/diff.rb', line 59 def to_text header + "\n\n" + diff + "\n\n" + links end |