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.



98
99
100
# File 'lib/net/protocol.rb', line 98

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

Instance Attribute Details

#ioObject (readonly)

Returns the value of attribute io



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

def io
  @io
end

Instance Method Details

#messageObject



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

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