class EventMachine::MockHttpRequest::FakeHttpClient

Attributes

data[R]
response[W]

Public Instance Methods

setup(response, uri) click to toggle source
# File lib/em-http/mock.rb, line 17
def setup(response, uri)
  @uri = uri
  if response == :fail
    fail(self)
  else
    if response.respond_to?(:call)
      response.call(self)
      @state = :body
    else
      receive_data(response)
    end
    @state == :body ? succeed(self) : fail(self)
  end
end
unbind() click to toggle source
# File lib/em-http/mock.rb, line 32
def unbind
end