Class: HttpStub::Server::Stub::Match::HashMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/http_stub/server/stub/match/hash_matcher.rb

Class Method Summary collapse

Class Method Details

.match?(stub_hash, actual_hash) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
12
# File 'lib/http_stub/server/stub/match/hash_matcher.rb', line 8

def self.match?(stub_hash, actual_hash)
  !stub_hash.find do |(key, value)|
    !HttpStub::Server::Stub::Match::StringValueMatcher.match?(value, actual_hash[key])
  end
end