Class: HTTPClient::LoopBackSocket

Inherits:
Object
  • Object
show all
Includes:
SocketWrap
Defined in:
lib/httpclient/session.rb

Overview

Dummy Socket for emulating loopback test.

Instance Method Summary collapse

Methods included from SocketWrap

#close, #closed?, #eof?, #flush, #gets, #read, #readpartial, #sync, #sync=

Constructor Details

#initialize(host, port, response) ⇒ LoopBackSocket

Returns a new instance of LoopBackSocket.



447
448
449
450
451
# File 'lib/httpclient/session.rb', line 447

def initialize(host, port, response)
  super(response.is_a?(StringIO) ? response : StringIO.new(response))
  @host = host
  @port = port
end

Instance Method Details

#<<(str) ⇒ Object



453
454
455
# File 'lib/httpclient/session.rb', line 453

def <<(str)
  # ignored
end