Class: HTTPClient::LoopBackSocket
- Inherits:
-
Object
- Object
- HTTPClient::LoopBackSocket
- Includes:
- SocketWrap
- Defined in:
- lib/httpclient.rb
Overview
HTTPClient::LoopBackSocket – dummy socket for dummy response
Instance Method Summary collapse
- #<<(str) ⇒ Object
- #addr ⇒ Object
-
#initialize(host, port, response) ⇒ LoopBackSocket
constructor
A new instance of LoopBackSocket.
Methods included from SocketWrap
#close, #closed?, #eof?, #flush, #gets, #read, #sync, #sync=
Constructor Details
#initialize(host, port, response) ⇒ LoopBackSocket
Returns a new instance of LoopBackSocket.
1222 1223 1224 1225 1226 |
# File 'lib/httpclient.rb', line 1222 def initialize(host, port, response) super(StringIO.new(response)) @host = host @port = port end |
Instance Method Details
#<<(str) ⇒ Object
1232 1233 1234 |
# File 'lib/httpclient.rb', line 1232 def <<(str) # ignored end |
#addr ⇒ Object
1228 1229 1230 |
# File 'lib/httpclient.rb', line 1228 def addr [nil, @port, @host, @host] end |