module Pact::MatchingRules

Public Class Methods

extract(object_graph, options = {}) click to toggle source

@api public Used by pact-mock_service

# File lib/pact/matching_rules.rb, line 10
def self.extract object_graph, options = {}
  pact_specification_version = options[:pact_specification_version] || Pact::SpecificationVersion::NIL_VERSION
  case pact_specification_version.major
  when nil, 0, 1, 2
    Extract.(object_graph)
  else
    V3::Extract.(object_graph)
  end
end
merge(object_graph, matching_rules, options = {}) click to toggle source
# File lib/pact/matching_rules.rb, line 20
def self.merge object_graph, matching_rules, options = {}
  pact_specification_version = options[:pact_specification_version] || Pact::SpecificationVersion::NIL_VERSION
  case pact_specification_version.major
  when nil, 0, 1, 2
    Merge.(object_graph, matching_rules)
  else
    V3::Merge.(object_graph, matching_rules)
  end
end