Class: Net::WriteTimeout

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

Overview

WriteTimeout, a subclass of Timeout::Error, is raised if a chunk of the response cannot be written within the write_timeout. Not raised on Windows.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(io = nil) ⇒ WriteTimeout

Returns a new instance of WriteTimeout.



100
101
102
# File 'lib/net/protocol.rb', line 100

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

Instance Attribute Details

#ioObject (readonly)

Returns the value of attribute io.



103
104
105
# File 'lib/net/protocol.rb', line 103

def io
  @io
end

Instance Method Details

#messageObject



105
106
107
108
109
110
111
# File 'lib/net/protocol.rb', line 105

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