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