Class: PactBroker::Verifications::PseudoBranchStatus
- Inherits:
-
Object
- Object
- PactBroker::Verifications::PseudoBranchStatus
- Defined in:
- lib/pact_broker/verifications/pseudo_branch_status.rb
Instance Method Summary collapse
-
#initialize(latest_pact, latest_verification) ⇒ PseudoBranchStatus
constructor
A new instance of PseudoBranchStatus.
- #to_s ⇒ Object
- #to_sym ⇒ Object
Constructor Details
#initialize(latest_pact, latest_verification) ⇒ PseudoBranchStatus
Returns a new instance of PseudoBranchStatus.
13 14 15 16 |
# File 'lib/pact_broker/verifications/pseudo_branch_status.rb', line 13 def initialize latest_pact, latest_verification @latest_pact = latest_pact @latest_verification = latest_verification end |
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/pact_broker/verifications/pseudo_branch_status.rb', line 18 def to_s to_sym.to_s end |
#to_sym ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/pact_broker/verifications/pseudo_branch_status.rb', line 22 def to_sym return :never unless latest_pact return :never unless ever_verified? if latest_verification_successful? if pact_changed_since_last_verification? :stale else :success end elsif latest_verification.failed_and_pact_pending? :failed_pending else :failed end end |