class ActiveResource::Request
Attributes
Public Class Methods
Source
# File lib/active_resource/http_mock.rb, line 282 def initialize(method, path, body = nil, headers = {}, options = {}) @method, @path, @body, @headers, @options = method, path, body, headers, options end
Public Instance Methods
Source
# File lib/active_resource/http_mock.rb, line 286 def ==(req) same_path?(req) && method == req.method && headers_match?(req) end
Source
# File lib/active_resource/http_mock.rb, line 297 def remove_query_params_from_path path.split("?").first end
Removes query parameters from the path.
@return [String] the path without query parameters
Source
# File lib/active_resource/http_mock.rb, line 290 def to_s "<#{method.to_s.upcase}: #{path} [#{headers}] (#{body})>" end