123456789_123456789_123456789_123456789_123456789_

Module: Net::SMTPError

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/net/smtp.rb

Overview

Module mixed in to all SMTP error classes

Instance Attribute Summary

  • #response readonly

    This class is a module for backward compatibility.

Instance Method Summary

Instance Attribute Details

#response (readonly)

This class is a module for backward compatibility. In later release, this module becomes a class.

[ GitHub ]

  
# File 'lib/net/smtp.rb', line 31

attr_reader :response

Instance Method Details

#initialize(response, message: nil)

[ GitHub ]

  
# File 'lib/net/smtp.rb', line 33

def initialize(response, message: nil)
  if response.is_a?(::Net::SMTP::Response)
    @response = response
    @message = message
  else
    @response = nil
    @message = message || response
  end
end

#message

[ GitHub ]

  
# File 'lib/net/smtp.rb', line 43

def message
  @message || response.message
end