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.



484
485
486
487
488
# File 'lib/httpclient/session.rb', line 484

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

Instance Method Details

#<<(str) ⇒ Object



490
491
492
# File 'lib/httpclient/session.rb', line 490

def <<(str)
  # ignored
end