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.



523
524
525
526
527
# File 'lib/httpclient/session.rb', line 523

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

Instance Method Details

#<<(str) ⇒ Object



529
530
531
# File 'lib/httpclient/session.rb', line 529

def <<(str)
  # ignored
end