Class/Module Index [+]

Quicksearch

WebMock::URIRegexpPattern

Public Instance Methods

add_query_params(query_params) click to toggle source
# File lib/webmock/request_pattern.rb, line 94
def add_query_params(query_params)
  @query_params = query_params.is_a?(Hash) ? query_params : Addressable::URI.parse('?' + query_params).query_values
end
matches?(uri) click to toggle source
# File lib/webmock/request_pattern.rb, line 83
def matches?(uri)
  WebMock::Util::URI.variations_of_uri_as_strings(uri).any? { |u| u.match(@pattern) } &&
    (@query_params.nil? || @query_params == uri.query_values)
end
to_s() click to toggle source
# File lib/webmock/request_pattern.rb, line 88
def to_s
  str = @pattern.inspect
  str += " with query params #{@query_params.inspect}" if @query_params
  str
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.