Class: HttpStub::Server::Stub::Match::RegexpValueMatcher
- Inherits:
-
Object
- Object
- HttpStub::Server::Stub::Match::RegexpValueMatcher
- Defined in:
- lib/http_stub/server/stub/match/regexp_value_matcher.rb
Class Method Summary collapse
Class Method Details
.match?(stub_value, actual_value) ⇒ Boolean
8 9 10 11 |
# File 'lib/http_stub/server/stub/match/regexp_value_matcher.rb', line 8 def self.match?(stub_value, actual_value) match_data = stub_value.match(/^regexp:(.*)/) match_data && !!Regexp.new(match_data[1]).match(actual_value) end |