Class: Pact::StringWithMatchingRules

Inherits:
String
  • Object
show all
Defined in:
lib/pact/consumer_contract/string_with_matching_rules.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string, pact_specification_version, matching_rules = {}) ⇒ StringWithMatchingRules

Returns a new instance of StringWithMatchingRules.



6
7
8
9
10
# File 'lib/pact/consumer_contract/string_with_matching_rules.rb', line 6

def initialize string, pact_specification_version, matching_rules = {}
  super(string)
  @matching_rules = matching_rules
  @pact_specification_version = pact_specification_version
end

Instance Attribute Details

#matching_rulesObject (readonly)



3
4
5
# File 'lib/pact/consumer_contract/string_with_matching_rules.rb', line 3

def matching_rules
  @matching_rules
end

#pact_specification_versionObject (readonly)



4
5
6
# File 'lib/pact/consumer_contract/string_with_matching_rules.rb', line 4

def pact_specification_version
  @pact_specification_version
end

Instance Method Details

#to_sObject

How can we show the matching rules too?



13
14
15
# File 'lib/pact/consumer_contract/string_with_matching_rules.rb', line 13

def to_s
  super
end