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.



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

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

Instance Method Details

#<<(str) ⇒ Object



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

def <<(str)
  # ignored
end