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.



210
211
212
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 210

def initialize(*args)
  @closed = false
end

Instance Attribute Details

#continue_timeoutObject

Returns the value of attribute continue_timeout.



208
209
210
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 208

def continue_timeout
  @continue_timeout
end

#read_timeoutObject

Returns the value of attribute read_timeout.



208
209
210
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 208

def read_timeout
  @read_timeout
end

#write_timeoutObject

Returns the value of attribute write_timeout.



208
209
210
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 208

def write_timeout
  @write_timeout
end

Instance Method Details

#closeObject



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

def close
  @closed = true
  nil
end

#closed?Boolean

Returns:

  • (Boolean)


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

def closed?
  @closed
end

#ioObject



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

def io
  @io ||= StubIO.new
end

#readuntil(*args) ⇒ Object



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

def readuntil(*args)
end