Class: PactBroker::Matrix::SelectorIgnorer
- Inherits:
-
Object
- Object
- PactBroker::Matrix::SelectorIgnorer
- Defined in:
- lib/pact_broker/matrix/selector_ignorer.rb
Instance Method Summary collapse
-
#ignore_pacticipant?(pacticipant) ⇒ Boolean
Whether the pacticipant should be ignored if the verification results are missing/failed.
-
#ignore_pacticipant_version?(pacticipant, version) ⇒ Boolean
Whether the pacticipant version should be ignored if the verification results are missing/failed.
-
#initialize(resolved_ignore_selectors) ⇒ SelectorIgnorer
constructor
A new instance of SelectorIgnorer.
Constructor Details
#initialize(resolved_ignore_selectors) ⇒ SelectorIgnorer
Returns a new instance of SelectorIgnorer.
19 20 21 |
# File 'lib/pact_broker/matrix/selector_ignorer.rb', line 19 def initialize(resolved_ignore_selectors) @resolved_ignore_selectors = resolved_ignore_selectors end |
Instance Method Details
#ignore_pacticipant?(pacticipant) ⇒ Boolean
Whether the pacticipant should be ignored if the verification results are missing/failed.
26 27 28 29 30 |
# File 'lib/pact_broker/matrix/selector_ignorer.rb', line 26 def ignore_pacticipant?(pacticipant) resolved_ignore_selectors.any? do | s | s.pacticipant_id == pacticipant.id && s.only_pacticipant_name_specified? end end |
#ignore_pacticipant_version?(pacticipant, version) ⇒ Boolean
Whether the pacticipant version should be ignored if the verification results are missing/failed.
36 37 38 39 40 |
# File 'lib/pact_broker/matrix/selector_ignorer.rb', line 36 def ignore_pacticipant_version?(pacticipant, version) resolved_ignore_selectors.any? do | s | s.pacticipant_id == pacticipant.id && (s.only_pacticipant_name_specified? || s.pacticipant_version_id == version.id) end end |