Exception: Gem::Net::WriteTimeout

Inherits:
Timeout::Error show all
Defined in:
lib/rubygems/vendor/net-protocol/lib/net/protocol.rb

Overview

WriteTimeout, a subclass of Gem::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

Methods inherited from Timeout::Error

handle_timeout

Constructor Details

#initialize(io = nil) ⇒ WriteTimeout

Returns a new instance of WriteTimeout.



100
101
102
# File 'lib/rubygems/vendor/net-protocol/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/rubygems/vendor/net-protocol/lib/net/protocol.rb', line 103

def io
  @io
end

Instance Method Details

#messageObject



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

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