Class: StubSocket

Inherits:
Object
  • Object
show all
Defined in:
lib/webmock/http_lib_adapters/net_http.rb

Overview

:nodoc:

Defined Under Namespace

Classes: StubIO

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ StubSocket

Returns a new instance of StubSocket.



214
215
216
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 214

def initialize(*args)
  @closed = false
end

Instance Attribute Details

#continue_timeoutObject

Returns the value of attribute continue_timeout.



212
213
214
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 212

def continue_timeout
  @continue_timeout
end

#read_timeoutObject

Returns the value of attribute read_timeout.



212
213
214
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 212

def read_timeout
  @read_timeout
end

#write_timeoutObject

Returns the value of attribute write_timeout.



212
213
214
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 212

def write_timeout
  @write_timeout
end

Instance Method Details

#closeObject



222
223
224
225
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 222

def close
  @closed = true
  nil
end

#closed?Boolean

Returns:

  • (Boolean)


218
219
220
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 218

def closed?
  @closed
end

#ioObject



230
231
232
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 230

def io
  @io ||= StubIO.new
end

#readuntil(*args) ⇒ Object



227
228
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 227

def readuntil(*args)
end