Class: PactBroker::Matrix::ResolvedSelectorBuilder
- Inherits:
-
Object
- Object
- PactBroker::Matrix::ResolvedSelectorBuilder
- Defined in:
- lib/pact_broker/matrix/resolved_selector_builder.rb
Instance Attribute Summary collapse
-
#pacticipant ⇒ Object
Returns the value of attribute pacticipant.
-
#versions ⇒ Object
Returns the value of attribute versions.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(unresolved_selector, selector_type, selector_ignorer) ⇒ ResolvedSelectorBuilder
constructor
A new instance of ResolvedSelectorBuilder.
Constructor Details
#initialize(unresolved_selector, selector_type, selector_ignorer) ⇒ ResolvedSelectorBuilder
Returns a new instance of ResolvedSelectorBuilder.
15 16 17 18 19 |
# File 'lib/pact_broker/matrix/resolved_selector_builder.rb', line 15 def initialize(unresolved_selector, selector_type, selector_ignorer) @unresolved_selector = unresolved_selector @selector_type = selector_type @selector_ignorer = selector_ignorer end |
Instance Attribute Details
#pacticipant ⇒ Object
Returns the value of attribute pacticipant.
10 11 12 |
# File 'lib/pact_broker/matrix/resolved_selector_builder.rb', line 10 def pacticipant @pacticipant end |
#versions ⇒ Object
Returns the value of attribute versions.
10 11 12 |
# File 'lib/pact_broker/matrix/resolved_selector_builder.rb', line 10 def versions @versions end |
Instance Method Details
#build ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/pact_broker/matrix/resolved_selector_builder.rb', line 21 def build if pacticipant && versions build_resolved_selectors_for_versions(pacticipant, versions, unresolved_selector, selector_type) elsif pacticipant selector_for_all_versions_of_a_pacticipant(pacticipant, unresolved_selector, selector_type) else build_selector_for_non_existing_pacticipant(unresolved_selector, selector_type) end end |