Class: PactBroker::Verifications::SummaryForConsumerVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/pact_broker/verifications/summary_for_consumer_version.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(verifications, pacts) ⇒ SummaryForConsumerVersion

Returns a new instance of SummaryForConsumerVersion.



7
8
9
10
# File 'lib/pact_broker/verifications/summary_for_consumer_version.rb', line 7

def initialize verifications, pacts
  @verifications = verifications
  @pacts = pacts
end

Instance Attribute Details

#verificationsObject (readonly)

Returns the value of attribute verifications.



5
6
7
# File 'lib/pact_broker/verifications/summary_for_consumer_version.rb', line 5

def verifications
  @verifications
end

Instance Method Details

#provider_summaryObject



16
17
18
19
20
21
22
# File 'lib/pact_broker/verifications/summary_for_consumer_version.rb', line 16

def provider_summary
  OpenStruct.new(
    successful: successful,
    failed: failed,
    unknown: unknown
    )
end

#successObject



12
13
14
# File 'lib/pact_broker/verifications/summary_for_consumer_version.rb', line 12

def success
  successful.count == pacts.count
end