class WebMock::URIRegexpPattern

Public Instance Methods

matches?(uri) click to toggle source
# File lib/webmock/request_pattern.rb, line 110
def matches?(uri)
  WebMock::Util::URI.variations_of_uri_as_strings(uri).any? { |u| u.match(@pattern) } &&
    (@query_params.nil? || @query_params == WebMock::Util::QueryMapper.query_to_values(uri.query))
end
to_s() click to toggle source
# File lib/webmock/request_pattern.rb, line 115
def to_s
  str = @pattern.inspect
  str += " with query params #{@query_params.inspect}" if @query_params
  str
end