Class: Pact::InteractionParser
- Inherits:
-
Object
- Object
- Pact::InteractionParser
- Defined in:
- lib/pact/consumer_contract/interaction_parser.rb
Class Method Summary collapse
- .call(hash, options = {}) ⇒ Object
- .parse_v2_interaction(hash, options) ⇒ Object
- .parse_v3_interaction(hash, options) ⇒ Object
Class Method Details
.call(hash, options = {}) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/pact/consumer_contract/interaction_parser.rb', line 7 def self.call hash, = {} pact_specification_version = [:pact_specification_version] || Pact::SpecificationVersion::NIL_VERSION case pact_specification_version.major when nil, 0, 1, 2 then parse_v2_interaction(hash, pact_specification_version: pact_specification_version) else parse_v3_interaction(hash, pact_specification_version: pact_specification_version) end end |
.parse_v2_interaction(hash, options) ⇒ Object
15 16 17 |
# File 'lib/pact/consumer_contract/interaction_parser.rb', line 15 def self.parse_v2_interaction hash, InteractionV2Parser.call(hash, ) end |
.parse_v3_interaction(hash, options) ⇒ Object
19 20 21 |
# File 'lib/pact/consumer_contract/interaction_parser.rb', line 19 def self.parse_v3_interaction hash, InteractionV3Parser.call(hash, ) end |