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.



53
54
55
# File 'lib/roda/plugins/error_mail.rb', line 53

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.



59
60
61
# File 'lib/roda/plugins/error_mail.rb', line 59

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