Class: Net::ReadTimeout

Inherits:
Timeout::Error
  • Object
show all
Defined in:
lib/net/protocol.rb

Overview

ReadTimeout, a subclass of Timeout::Error, is raised if a chunk of the response cannot be read within the read_timeout.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(io = nil) ⇒ ReadTimeout

:stopdoc:



116
117
118
# File 'lib/net/protocol.rb', line 116

def initialize(io = nil)
  @io = io
end

Instance Attribute Details

#ioObject (readonly)

Returns the value of attribute io.



119
120
121
# File 'lib/net/protocol.rb', line 119

def io
  @io
end

Instance Method Details

#messageObject



121
122
123
124
125
126
127
# File 'lib/net/protocol.rb', line 121

def message
  msg = super
  if @io
    msg = "#{msg} with #{@io.inspect}"
  end
  msg
end