Class: EventMachine::Http::MonitorFactory::FakeHttpClient

Inherits:
EM::HttpClient
  • Object
show all
Defined in:
lib/em-http-monitor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



17
18
19
# File 'lib/em-http-monitor.rb', line 17

def data
  @data
end

#response=(value) ⇒ Object (writeonly)

Sets the attribute response

Parameters:

  • value

    the value to set the attribute response to.



16
17
18
# File 'lib/em-http-monitor.rb', line 16

def response=(value)
  @response = value
end

Instance Method Details

#close_connectionObject



31
32
# File 'lib/em-http-monitor.rb', line 31

def close_connection
end

#setup(response, uri) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/em-http-monitor.rb', line 18

def setup(response, uri)
  @uri = uri
  if response == :fail
    fail(self)
  else
    original_receive_data(response)
    succeed(self)
  end
end

#unbindObject



28
29
# File 'lib/em-http-monitor.rb', line 28

def unbind
end