Class: HTTPClient::LoopBackSocket
- Inherits:
-
Object
- Object
- HTTPClient::LoopBackSocket
- Includes:
- SocketWrap
- Defined in:
- lib/httpclient/session.rb
Overview
Dummy Socket for emulating loopback test.
Instance Method Summary collapse
- #<<(str) ⇒ Object
-
#initialize(host, port, response) ⇒ LoopBackSocket
constructor
A new instance of LoopBackSocket.
- #peer_cert ⇒ Object
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.
417 418 419 420 421 |
# File 'lib/httpclient/session.rb', line 417 def initialize(host, port, response) super(response.is_a?(StringIO) ? response : StringIO.new(response)) @host = host @port = port end |
Instance Method Details
#<<(str) ⇒ Object
423 424 425 |
# File 'lib/httpclient/session.rb', line 423 def <<(str) # ignored end |
#peer_cert ⇒ Object
427 428 429 |
# File 'lib/httpclient/session.rb', line 427 def peer_cert nil end |