Class ActiveResource::Request
In: activeresource/lib/active_resource/http_mock.rb
Parent: Object

Methods

==   eql?   hash   new   to_s  

Attributes

body  [RW] 
headers  [RW] 
method  [RW] 
path  [RW] 

Public Class methods

[Source]

# File activeresource/lib/active_resource/http_mock.rb, line 80
    def initialize(method, path, body = nil, headers = {})
      @method, @path, @body, @headers = method, path, body, headers
      @headers.update('Content-Type' => 'application/xml')
    end

Public Instance methods

[Source]

# File activeresource/lib/active_resource/http_mock.rb, line 85
    def ==(other_request)
      other_request.hash == hash
    end

[Source]

# File activeresource/lib/active_resource/http_mock.rb, line 89
    def eql?(other_request)
      self == other_request
    end

[Source]

# File activeresource/lib/active_resource/http_mock.rb, line 97
    def hash
      "#{path}#{method}#{headers}".hash
    end

[Source]

# File activeresource/lib/active_resource/http_mock.rb, line 93
    def to_s
      "<#{method.to_s.upcase}: #{path} [#{headers}] (#{body})>"
    end

[Validate]