# File lib/webmock/request_pattern.rb, line 140 140: def matches?(body, content_type = "") 141: if (@pattern).is_a?(Hash) 142: return true if @pattern.empty? 143: 144: case BODY_FORMATS[content_type] 145: when :json then 146: Crack::JSON.parse(body) == @pattern 147: when :xml then 148: Crack::XML.parse(body) == @pattern 149: else 150: Addressable::URI.parse('?' + body).query_values == @pattern 151: end 152: else 153: empty_string?(@pattern) && empty_string?(body) || 154: @pattern == body || 155: @pattern === body 156: end 157: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.