Sha256: b1a53286581089c40b2339c4db092f4e9fa07f209d959562029e1d4d3b62bd68

Contents?: true

Size: 633 Bytes

Versions: 1

Compression:

Stored size: 633 Bytes

Contents

module FakeMechanize
  class Request
    attr_reader :method, :uri, :request_headers, :body, :status, :response_headers
    
    def initialize(args = {})
      # Query
      @method           = args[:method] || :get
      @uri              = args[:uri]
      @request_headers  = args[:request_headers] || {}
      
      # Answer
      @body             = args[:body]
      @status           = args[:status] || 200
      @response_headers = args[:response_headers] || {}
    end
    
    def ==(alt)
      method == alt.method and uri == alt.uri and request_headers == alt.request_headers
    end
  end # Request
end # FakeMechanize

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fake_mechanize-0.0.0 lib/fake_mechanize/request.rb