Class: Pact::MatchingRules::V3::Extract
- Inherits:
-
Object
- Object
- Pact::MatchingRules::V3::Extract
- Defined in:
- lib/pact/matching_rules/v3/extract.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(matchable) ⇒ Extract
constructor
A new instance of Extract.
Constructor Details
#initialize(matchable) ⇒ Extract
Returns a new instance of Extract.
13 14 15 16 |
# File 'lib/pact/matching_rules/v3/extract.rb', line 13 def initialize matchable @matchable = matchable @rules = Hash.new end |
Class Method Details
.call(matchable) ⇒ Object
9 10 11 |
# File 'lib/pact/matching_rules/v3/extract.rb', line 9 def self.call matchable new(matchable).call end |
Instance Method Details
#call ⇒ Object
18 19 20 21 |
# File 'lib/pact/matching_rules/v3/extract.rb', line 18 def call recurse matchable, "$", nil rules end |