Module: Roda::RodaPlugins::ErrorMail::InstanceMethods

Defined in:
lib/roda/plugins/error_mail.rb

Instance Method Summary collapse

Instance Method Details

#error_mail(exception) ⇒ Object

Send an email for the given error. exception is usually an exception instance, but it can be a plain string which is used as the subject for the email.



57
58
59
# File 'lib/roda/plugins/error_mail.rb', line 57

def error_mail(exception)
  _error_mail(exception).deliver!
end

#error_mail_content(exception) ⇒ Object

The content of the email to send, include the headers and the body. Takes the same argument as #error_mail.



63
64
65
# File 'lib/roda/plugins/error_mail.rb', line 63

def error_mail_content(exception)
  _error_mail(exception).to_s
end