Exception: MidiSmtpServer::SmtpdException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/midi-smtp-server/exceptions.rb

Overview

generic smtp server exception class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, smtpd_return_code, smtpd_return_text) ⇒ SmtpdException

Returns a new instance of SmtpdException.



36
37
38
39
40
41
42
# File 'lib/midi-smtp-server/exceptions.rb', line 36

def initialize(msg, smtpd_return_code, smtpd_return_text)
  # save reference for smtp dialog
  @smtpd_return_code = smtpd_return_code
  @smtpd_return_text = smtpd_return_text
  # call inherited constructor
  super msg
end

Instance Attribute Details

#smtpd_return_codeObject (readonly)

Returns the value of attribute smtpd_return_code.



33
34
35
# File 'lib/midi-smtp-server/exceptions.rb', line 33

def smtpd_return_code
  @smtpd_return_code
end

#smtpd_return_textObject (readonly)

Returns the value of attribute smtpd_return_text.



34
35
36
# File 'lib/midi-smtp-server/exceptions.rb', line 34

def smtpd_return_text
  @smtpd_return_text
end

Instance Method Details

#smtpd_resultObject



44
45
46
# File 'lib/midi-smtp-server/exceptions.rb', line 44

def smtpd_result
  return "#{@smtpd_return_code} #{@smtpd_return_text}"
end