Class: EventMachine::MockHttpRequest::RegisteredRequest

Inherits:
Struct
  • Object
show all
Defined in:
lib/em-http/mock.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#headersObject

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



8
9
10
# File 'lib/em-http/mock.rb', line 8

def headers
  @headers
end

#methodObject

Returns the value of attribute method

Returns:

  • (Object)

    the current value of method



8
9
10
# File 'lib/em-http/mock.rb', line 8

def method
  @method
end

#uriObject

Returns the value of attribute uri

Returns:

  • (Object)

    the current value of uri



8
9
10
# File 'lib/em-http/mock.rb', line 8

def uri
  @uri
end

Class Method Details

.build(uri, method, headers) ⇒ Object



9
10
11
# File 'lib/em-http/mock.rb', line 9

def self.build(uri, method, headers)
  new(uri, method.to_s.upcase, headers || {})
end